[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5348) support for TypedQuery jpaql/hql "scalar" queries
Steve Ebersole (JIRA)
noreply at atlassian.com
Wed Aug 24 13:50:05 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43343#comment-43343 ]
Steve Ebersole commented on HHH-5348:
-------------------------------------
Unfortunately the '3.6.3' inclusion in the fix version was inaccurate. This fix was only ever applied to the master branch which serves as 4.0. I ported this to the 3.6 branch as part of HHH-6591
> support for TypedQuery jpaql/hql "scalar" queries
> -------------------------------------------------
>
> Key: HHH-5348
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5348
> Project: Hibernate Core
> Issue Type: Patch
> Components: entity-manager
> Affects Versions: 3.5.3, 3.6.0, 3.6.4, 3.6.6
> Reporter: nodje
> Assignee: Steve Ebersole
> Priority: Critical
> Fix For: 3.6.3, 4.0.0.Alpha2
>
> Attachments: 0001-HHH-5348-java.lang.IllegalArgumentException.patch, ItemNameDescription.java
>
> Time Spent: 2h 17m
> Remaining Estimate: 0h
>
> I'm getting a
> java.lang.IllegalArgumentException: Cannot create TypedQuery for query with more than one return
> with a query that returns a View object.
> AbstractEntityManager:279, detects as many returns type as there is parameters in the View object, instead of one single result type, the View Object itself.
> QueryString example that fails with public <T> TypedQuery<T> createQuery(String jpaqlString, Class<T> resultClass):
> "select new WorkContractDto(wc.workContractStartDate, wc.workContractEndDate, wc.workContractEmployeeLastName, wc.workContractSendingStatus) from WorkContract wc where wc.workContractEmployeeLastName = ?1"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list