-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Duplicate Assocation Path Error
PostPosted: Wed Aug 14, 2013 12:43 am 
Newbie

Joined: Wed Aug 14, 2013 12:31 am
Posts: 1
Hi,
I am facing Duplicate Association Path error in this Hibernate Join ,

Here is the DB Relationships,
User -> Vendor
Vendor -> Business -> Clients
Vendor -> Technology -> Applications

Here is my code,
DetachedCriteria user = DetachedCriteria.forClass("User.class");

user.createAlias("vendor", "V1");
user.createAlias("vendor", "V2");

DetachedCriteria client = user.createCriteria("V1.business").createCriteria("clients");
DetachedCriteria Tech = user.createCriteria("V2.Technlogy");

The other way i tried is,

DetachedCriteria client = user.createCriteria("vendor").createCriteria("business").createCriteria("clients");
DetachedCriteria Tech = user.createCriteria("vendor").createCriteria("Technlogy");

I am getting the duplicate Association Path error on the Vendor.

Anything wrong in this association? Can anyone help me please?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.