[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-879) Enable joining the same association twice with Criteria

Pierre-David Belanger (JIRA) noreply at atlassian.com
Mon Oct 16 19:52:27 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-879?page=comments#action_24824 ] 

Pierre-David Belanger commented on HHH-879:
-------------------------------------------

Here is, for this issue, a very simple test case to add in org.hibernate.test.criteria.CriteriaQueryTest :

    /**
     * test case for the issue id HHH-879 
     */
    public void testJoiningTheSameAssociationTwice() {
        Session s = openSession();
        Transaction t = s.beginTransaction();

        Criteria studentCriteria = s.createCriteria(Student.class);
        studentCriteria.createCriteria("preferredCourse", "preferredCourse1", Criteria.LEFT_JOIN);
        studentCriteria.createCriteria("preferredCourse", "preferredCourse2", Criteria.LEFT_JOIN);
        try {
            studentCriteria.list();
        } catch (Exception e) {
            fail("This query should not throw any exception since we use diffrent alias for the same path : " + e.getMessage());
        }

        t.rollback();
        s.close();
    }

> Enable joining the same association twice with Criteria
> -------------------------------------------------------
>
>          Key: HHH-879
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-879
>      Project: Hibernate3
>         Type: Improvement

>   Components: core
>     Reporter: Vladimir Bayanov

>
>
> Make double joining the same association with Criteria.createCriteria possible. See: http://forum.hibernate.org/viewtopic.php?t=931249

-- 
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