Add outer join support for aliases on DetachedCriteria

Description

Recently, support for aliasing via an outer join was added to the Criteria class. The method
createAlias(String associationPath, String alias, int joinType)
, however, is not defined for DetachedCriteria. Adding this functionality would be extremely helpful for applications that expose detached criteria as their query api, and also for subqueries.

Environment

Hibernate 3.1, SQLServer2000

Activity

Show:
Benoit Goudreault-Emond
July 14, 2006, 3:18 PM

I've attached a simple patch against 3.1.3 that implements this feature. Actually, what the patch does is implement relevant functions in Criteria in the DetachedCriteria class. Those are:

  • All variants of createAlias()

  • All variants of createCriteria()

  • All variants of setLockMode()

  • setComment() (not used much, I suppose, but why not?)

It wasn't clear whether setFlushMode() and setCacheMode() should be applied to DetachedCriteria. My guess is that those are more properties of the executable criteria, like setFirstResult()/setMaxResult(), and aren't part of the query itself, but rather, of the execution environment.

Diego Plentz
October 5, 2007, 3:54 PM

Fixed in trunk/3.2

thanks

Chris Bredesen
August 15, 2008, 10:21 PM

Also adding this to EAP 4.2, 4.3:
https://jira.jboss.org/jira/browse/JBPAPP-1083

Steve Ebersole
March 21, 2011, 7:06 PM

Bulk closing stale resolved issues

Assignee

Diego Plentz

Reporter

Mark Brocato

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