DetachedCriteria.createCriteria not working with alias

Description

DetachedCriteria.createCriteria(associationPath, alias) is calling the wrong Criteria.createCriteria method

public DetachedCriteria createCriteria(String associationPath, String alias)
throws HibernateException {
return new DetachedCriteria( impl, criteria.createCriteria(associationPath) );
}

should be:

public DetachedCriteria createCriteria(String associationPath, String alias)
throws HibernateException {
return new DetachedCriteria( impl, criteria.createCriteria(associationPath, alias) );
}

Environment

Oracle

Activity

Show:
Yajun Shi
January 19, 2007, 8:37 PM

KB Candidate:

Title:
DetachedCriteria doesn't create criteria with alias

There is a known bug in Hibernate 3.1.3 and 3.2.1. In class DetachedCriteria, method DetachedCriteria createCriteria(String associationPath, String alias) ignores parameter alias so that you cannot create criteria with alias. We are providing a patch for it in Sash 2.0.

If you need further assistance, feel free to contact Sourcelabs Support.

Yajun Shi
January 19, 2007, 8:38 PM

Sorry for the confusion, ignore the comment above.

Philip Saville
August 27, 2007, 8:13 PM

I would like to see this issue fixed in the next build - it is very frustrating to have to keep applying a patch to hibernate for something so trivial yet fundamental in functionality.

I also recommend the priority be increased, since this is a serious problem in the core of hibernate, even though the fix is trivial.

Diego Plentz
September 8, 2007, 11:26 PM

Done in trunk/branch 3.2

Steve Ebersole
March 21, 2011, 7:04 PM

Bulk closing stale resolved issues

Assignee

Diego Plentz

Reporter

Felipe Cuozzo

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure