arin wrote:
.... Now, this relationship creates a third table called User_Customer table to maintain the relation. So, we can't access the intermediate table. Now, When I am updating User, it's automatically required one entry in user_customer table ....
From your description this seems like a common pattern that has been used a lot of times by other developers including myself (see also Hibernate documentation
http://www.hibernate.org/hib_docs/v3/re ... irectional).
What I don't understand is why an entry is required in the User_Customer table in your case. This is certainly not normal, and I can't think of any way to create a mapping/annotations that can cause this behavior. What happens when you try to save a User that has no Customer? Do you get any error messages?