[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2653) DetachedCriteria does not create assocation criteria with alias
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Sun Sep 9 16:42:15 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Pires Plentz resolved HHH-2653.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Duplicate
> DetachedCriteria does not create assocation criteria with alias
> ---------------------------------------------------------------
>
> Key: HHH-2653
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2653
> Project: Hibernate3
> Issue Type: Bug
> Components: query-criteria
> Affects Versions: 3.2.4.sp1
> Reporter: Jörg Heinicke
> Assignee: Diego Pires Plentz
> Original Estimate: 15 minutes
> Remaining Estimate: 15 minutes
>
> It's known that ordering on association properties in the criteria API only works with aliases (http://forum.hibernate.org/viewtopic.php?t=972241 and countless other threads, HHH-2629). Unfortunately, you can't even use the aliases with DetachedCriteria since it has a bug:
> public DetachedCriteria createCriteria(String associationPath, String alias) throws HibernateException {
> return new DetachedCriteria( impl, criteria.createCriteria(associationPath) );
> }
> public DetachedCriteria createCriteria(String associationPath) throws HibernateException {
> return new DetachedCriteria( impl, criteria.createCriteria(associationPath) );
> }
> As you can see both implementations are equal, the first one ignores the alias parameter. It has to be
> public DetachedCriteria createCriteria(String associationPath, String alias) throws HibernateException {
> return new DetachedCriteria( impl, criteria.createCriteria(associationPath, alias) );
> }
--
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