[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4862?page=c...
]
Steve Ebersole closed HHH-4862.
-------------------------------
Resolution: Fixed
column name quoting not properly handled for
javax.persistence.ColumnResult
---------------------------------------------------------------------------
Key: HHH-4862
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4862
Project: Hibernate Core
Issue Type: Bug
Components: core, query-sql
Affects Versions: 3.5.0-Beta-3
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.5.0-Beta-4
Time Spent: 1 hour, 8 minutes
Remaining Estimate: 0 minutes
A quoted column name specified in @javax.persistence.ColumnResult is not properly handled
during "type auto-detection" leading to errors like:
{noformat}
org.hibernate.HibernateException: Could not resolve column name in result set [`INAME`]
at
org.hibernate.loader.custom.CustomLoader$Metadata.resolveColumnPosition(CustomLoader.java:567)
at
org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(CustomLoader.java:507)
at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:526)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1836)
at org.hibernate.loader.Loader.doQuery(Loader.java:714)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2249)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2146)
at org.hibernate.loader.Loader.list(Loader.java:2141)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:314)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1832)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:176)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:226)
{noformat}
The underlying issue is that the quoted identifier is not wrapped in the dialect-specific
quoting. Here `INAME` should have become "INAME" or [INAME] etc depending on
the dialect
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira