One-to-One Association

One-to-one associations are the simplest kind of associations. They usually correspond to the foreign key relations when the foreign key column is the primary key column.

Telerik Data Access supports only one-to-one associations when the foreign key and the primary key in the dependent entity class (class, corresponding to the table that has the foreign key) consist of the same columns. It does not support cases when the foreign key is some non-primary unique property.

The database contains the Person and Contact tables, between which there is a foreign key created against the primary key fields of these tables.

images_Association1to1-table

We perform the following sequence of operations:

create a Telerik Data Access model;
add the Person and Contact tables to the model.

As a result, we have the following model:

images_Association1to1-model-TDA

The association between the Person and the Contact entities looks as follows:

images_AssociationEditor1to1Case1-TDA

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.