[jboss-user] [EJB 3.0] - @OneToOne (EntityA 1:0..1 EntityB)
jbossuser_4418
do-not-reply at jboss.com
Sat Nov 11 20:46:47 EST 2006
Hello,
Having tried various experiments and 'googled' all over the place, I'm unable to create two entities that create a one for one join which when reversed engineered into an ERD tool (eg. MySQL Workbench) shows up with the correct notation (i.e. a one to one join).
The scenario...
EntityA has a compound primary key (two fields) and various other non-key fields. EntityA can be associated with zero or one EntityB objects (but no more).
EntityB has one non-key field. For each EntityB there must be one and only one EntityA.
I don't want EntityB to have its own primary key.
How can I annotate both EntityA and EntityB to ensure the above cardinality and correct reverse engineering in a data modeling tool?
Thanks,
Matthew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985175#3985175
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985175
More information about the jboss-user
mailing list