[
https://issues.jboss.org/browse/HIBERNATE-153?page=com.atlassian.jira.plu...
]
Steve Ebersole commented on HIBERNATE-153:
------------------------------------------
That is simply not legal call according to JPA. Eclipselink seems to have an extension in
place there. Here is the javadoc for that method:
{code}
/**
* Create an instance of <code>TypedQuery</code> for executing a
* Java Persistence query language statement.
* The select list of the query must contain only a single
* item, which must be assignable to the type specified by
* the <code>resultClass</code> argument.
* @param qlString a Java Persistence query string
* @param resultClass the type of the query result
* @return the new query instance
* @throws IllegalArgumentException if the query string is found
* to be invalid or if the query result is found to
* not be assignable to the specified type
* @since Java Persistence 2.0
*/
public <T> TypedQuery<T> createQuery(String qlString, Class<T>
resultClass);
{code}
Notice specifically...
{quote}
The select list of the query must contain only a single item, which must be assignable to
the type specified by the <code>resultClass</code> argument
{quote}
JPA 2.1 Native Query Result mapping problem Hibernate 4 , 5
version
-----------------------------------------------------------------------
Key: HIBERNATE-153
URL:
https://issues.jboss.org/browse/HIBERNATE-153
Project: Hibernate Integration
Issue Type: Bug
Reporter: Gulam Samdani
Assignee: Steve Ebersole
Labels: task
error details
Posts: 32
[Post New]posted Today 12:07:34 PM
Quote Edit
I am faceing a critical problem in JPA 2.1 with Hibernate orm 4/5 . any one please give
me a suggestion ?
But same code working in JPA2.1 with Eclipselink orm all version. i have to use hibernate
so, how to solve it hibernate
Error : column "contactid" found
http://www.coderanch.com/t/658080/ORM/databases/JPA-Native-Query-Result-m...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)