0 Replies Latest reply on Nov 11, 2006 8:46 PM by jbossuser_4418

    @OneToOne (EntityA 1:0..1 EntityB)

    jbossuser_4418

      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