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