[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4893) Multiple Joins using criteria
praveer gupta (JIRA)
noreply at atlassian.com
Tue Feb 9 10:21:31 EST 2010
Multiple Joins using criteria
-----------------------------
Key: HHH-4893
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4893
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.3.2
Reporter: praveer gupta
I need to do multiple joins between two tables using Hibernate criteria.
I tried doing the following:
Crtieria criteria = session.createCriteria(Cat.class, "cat");
criteria.createAlias("cat.kittens", "first", CriteriaSpecification.LEFT_JOIN)
.add( Restrictions.eq("first.name", "Foo"));
criteria.createAlias("cat.kittens", "second", CriteriaSpecification.LEFT_JOIN)
.add( Restrictions.eq("second.name", "Bar"));
criteria.list();
I get the following: org.hibernate.QueryException: duplicate association path
I tried looking for issues regarding the same and found http://opensource.atlassian.com/projects/hibernate/browse/HB-555.
I am not aware whether we can do multiple joins using criteria now.
--
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