Message:
The following issue has been closed.
Resolver: Gavin King
Date: Tue, 16 Dec 2003 6:15 AM
This is expected functionality, Criteria API does not support multiple joins to same association.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-555
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-555
Summary: Multiple joins using criteria
Type: Bug
Status: Closed
Priority: Major
Resolution: REJECTED
Project: Hibernate2
Versions:
2.1
Assignee: Gavin King
Reporter: Mike Mosiewicz
Created: Tue, 16 Dec 2003 4:30 AM
Updated: Tue, 16 Dec 2003 6:15 AM
Environment: Hibernate 2.1 final, JDK 1.4.2_02
Description:
Suppose you want to find a Cat that have kittens named Foo and Bar. You would want to try the following criteria:
Crtieria c = sess.createCriteria(Cat.class);
c.createCriteria("kittens", "first")
.add( Expression.eq("name", "Foo");
c.createCriteria("kittens", "second")
.add( Expression.eq("name", "Bar");
c.list();
You would expect that the following query would create multiple joins. However while it creates multiple WHERE conditions for proper aliases, it doesn't create multiple joins, i.e. it only creates join for the first createCriteria.
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|