Chapter 8 O/R Mapping Modeling


Defining one-to-one association mapping

You can map each unidirectional one-to-one association to a reference key. The foreign key should have the same direction as the association. Suppose that we have two entity classes, Person and Account , and a one-to-one association between them.


The association is unidirectional and navigates from the entity class Person to the entity class Account .


The association and the reference key are linked in the Mapping Editor.


For a bi-directional one-to-one association, you also just can map it to one reference key. But the reference can navigate in either direction.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.