[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2989) @Loader using named queries returns null

Jose Noheda (JIRA) noreply at atlassian.com
Tue Dec 4 04:48:56 EST 2007


@Loader using named queries returns null
----------------------------------------

                 Key: HHH-2989
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2989
             Project: Hibernate3
          Issue Type: Bug
    Affects Versions: 3.2.5
         Environment: Hibernate 3.2.5, Hibernate Annotations 3.3.0, Hibernate Entity Manager 3.3.1
            Reporter: Jose Noheda


When using entitymanager.find (class, pk) with a @Loader annotation declared the org.hibernate.persister.entity.NamedQueryLoader load function performs a query.list() call (line 57). This call returns a List of entities and the list is correctly filled with one entry (org.hibernate.impl.SessionImpl line 1121). After returning, the line 62 (of NamedQueryLoader): 

return session.getPersistenceContext().getEntity( new EntityKey( id, persister, session.getEntityMode() ) ) 

is unable to find it though. 

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