]
Ronak Patel commented on HHH-6695:
----------------------------------
I hope this will be taken care of in hibernate-release 4.0.0. This has been a bug
that's been around hibernate for at least a year; if not more. One of the most
infamous ones...
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 ORM
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: