[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6695) Error "Cannot create TypedQuery for query with more than one return" with named queries

Edward Rayl (JIRA) noreply at atlassian.com
Sat Dec 24 17:25:21 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44696#comment-44696 ] 

Edward Rayl commented on HHH-6695:
----------------------------------

Testing shows that hibernate-release-4.0.0 is has not fixed this bug.

> Error "Cannot create TypedQuery for query with more than one return" with named queries
> ---------------------------------------------------------------------------------------
>
>                 Key: HHH-6695
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6695
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: entity-manager
>    Affects Versions: 3.6.7, 4.0.0.CR4, 3.6.8
>            Reporter: Oliver Siegmar
>
> The already closed issues HHH-5348 and HHH-6591 only fixed the bug with standard (non-named) queries. Having a query like {code:sql}SELECT NEW org.test.MyClass( 'Foo', 123 ) FROM IrcEvent ev{code} as shown in HHH-6591 used by createQuery(), the bug has been fixed. Using the very same query as a named query by createNamedQuery() this exception is thrown:
> {noformat}
> java.lang.IllegalArgumentException: Cannot create TypedQuery for query with more than one return
>         at org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:684) ~[hibernate-entitymanager-4.0.0-20110929.060732-144.jar:4.0.0-SNAPSHOT]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0]
> ...
> {noformat}

--
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