-->
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: Entity associated with 2 other entities of same row fails
PostPosted: Mon Mar 17, 2008 1:43 pm 
Newbie

Joined: Mon Mar 17, 2008 12:41 am
Posts: 1
I have a User entity object which has an associated billingAddress and a shippingAddress entity objects
User to billingAddress association and User to shippingAddress entity association is one to one . I use fetch = FetchType.EAGER for both the User-billingAddress and User-shippingAddress association

If both the billingAddress entity and the shippingAdress entity point to the same row in the database and I load the persisted User object
Hibernate throws
Code:
Error performing load command
org.hibernate.HibernateException: More than one row with the given identifier was found:


How is this problem solved ? i.e On loading a User with the same billingAddress and shippingAddress entity value I avoid getting this 'More than one row error'.
Thanks


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.