[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6304) Exception on consturctor query jpql

Ondra Žižka (JIRA) noreply at atlassian.com
Mon Feb 27 06:38:51 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-6304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45706#comment-45706 ] 

Ondra Žižka commented on HHH-6304:
----------------------------------

This is duplicated by HHH-6695 which is closed.
Should this be closed as well?

> Exception on consturctor query jpql
> -----------------------------------
>
>                 Key: HHH-6304
>                 URL: https://hibernate.onjira.com/browse/HHH-6304
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: entity-manager
>    Affects Versions: 3.6.2, 3.6.3, 3.6.4, 3.6.5, 4.0.0.Final, 4.0.1
>            Reporter: Itis Me
>
> Constructor queries (SELECT NEW xyz(a,b)...) with more than one parameter in the constructor are resulting in an java.lang.IllegalArgumentException: Cannot create TypedQuery for query with more than one return.
> Code snippet for testing:
> List<ListResult> resultList = em.createQuery("SELECT NEW domain.results.ListResult(p.name, p.adress) FROM Person p", ListResult.class).getResultList();
> Moreover queries with one paramater in ctor result in an 
> java.lang.IllegalArgumentException: Type specified for TypedQuery [com.evva.keyxs.backend.domain.results.ListResult] is incompatible with query return type [class java.lang.String]
> at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:286)
> More on this in HHH-5348. Its not fixed yet.
> http://opensource.atlassian.com/projects/hibernate/browse/HHH-5348

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