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