[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Composite keys that includes a relationship

elgabo do-not-reply at jboss.com
Wed Oct 15 20:48:24 EDT 2008


Hi,

Finally I found the solution ... this tutorials helped me very much

http://beavercreekconsulting.com/blog/2008/10/hibernate-annotations-for-a-one-to-many-mapping/ 
http://boris.kirzner.info/blog/archives/2008/07/19/hibernate-annotations-the-many-to-many-association-with-composite-key/ 

Basically the primary key must be represented as a EmbeddedId that has a @ManyToOne annotated attribute.  And on the owned side of the relationship the class must be annotated with @AssociationOverride


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

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



More information about the jboss-user mailing list