[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2597) Criteria API should handle entity aliases

Paul Benedict (JIRA) noreply at atlassian.com
Sat Sep 26 23:43:50 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34055#action_34055 ] 

Paul Benedict commented on HHH-2597:
------------------------------------

I presume Hibernate Entity Persister's also do not key off the EJB name. If that's true, it also affects any Session method that accepts an entity name, and at least the Hibernate annotation documentation should be updated to mention this. It's just not obvious (or desired).

> Criteria API should handle entity aliases
> -----------------------------------------
>
>                 Key: HHH-2597
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2597
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: query-criteria
>            Reporter: Emmanuel Bernard
>            Priority: Minor
>
> HQL takes entity alias into account 
> Criteria does not seem to do so
> "I'm trying to use @Entity(name="Test") to map a very simple pojo, but hibernate seems to ignore entity name, ie.: session.createCritirea("Test").list() throws "org.hibernate.MappingException: Unknown entity: Test" but session.createCritirea(myPojoClassName).list() works. "
> http://forum.hibernate.org/viewtopic.php?p=2350219

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