[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6394) org.hibernate.metamodel.source.annotations.global.QueryBinder handles resultClass paramter of @NamedNativeQuery wrong

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Jul 6 11:16:53 EDT 2011


org.hibernate.metamodel.source.annotations.global.QueryBinder handles resultClass paramter of @NamedNativeQuery wrong
---------------------------------------------------------------------------------------------------------------------

                 Key: HHH-6394
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6394
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 4.0.0.Beta2
            Reporter: Hardy Ferentschik
            Assignee: Hardy Ferentschik
             Fix For: 4.0.0.Beta3


The code makes a invalid comparison when the _resultClass_ parameter gets retrieved.
{code}
String resultClass = JandexHelper.getValueAsString( annotation, "resultClass" );
if ( void.class.equals( resultClass ) ) {
   throw new NotYetImplementedException( "Pure native scalar queries are not yet supported" );
}
{code} 

the comparison in the if statement will cause a _ClassCastExcpetion_ 

-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list