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

Tsuyoshi Goto (JIRA) noreply at atlassian.com
Mon Nov 19 00:17:01 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28883 ] 

Tsuyoshi Goto commented on HHH-879:
-----------------------------------

Hello Ali,

I am trying to apply your suggestion but I can not see how this exception thrown form CriteriaQueryTranslator#createAssociationPathCriteriaMap is avoided.

Do you mean I should somehow extends CriteriaQueryTranslator and not to call createAssociationPathCriteriaMap from the constructor also? (Because I don't see JoinWalker.isDuplicateAssociation method is called in the trace bellow)

I am taking about org.hibernate.QueryException: duplicate association path: impactImperatives
at org.hibernate.loader.criteria.CriteriaQueryTranslator.createAssociationPathCriteriaMap(CriteriaQueryTranslator.java:141)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.<init>(CriteriaQueryTranslator.java:80)
at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:58) 
(using Hibernate3.1.3)

Or are you guys taking about a different thing?

BTW, I could make an external Util method that can retrieve the Subcriteria for the same path for the duplicated path and it was working fine. But this time I faced the situation that requires the duplicated path Subcriteria with a different 'alias'.

Best Regards,
    Tsuyoshi

 

> Enable joining the same association twice with Criteria
> -------------------------------------------------------
>
>                 Key: HHH-879
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-879
>             Project: Hibernate3
>          Issue 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