[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Two Entity has @OneToMany to the same Entity

claudio_br do-not-reply at jboss.com
Thu Nov 29 07:11:17 EST 2007


How can I do two Entity has @OneToMany to the same Entity?
For example the Entity A has @OneToMany to Entity C and Entity B has @OneToMany to Entity C too.
The Hibernate adds in the Entity C the id of Entity A or Entity B, but in the search the Hibernate doesn´t know of which Entity the id referer (Entity A or Entity B).
How can I resolve this problem?
Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108855#4108855

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108855




More information about the jboss-user mailing list