Skip to content

RelationshipOneToOne

iraichi edited this page Apr 24, 2015 · 24 revisions

How to define a one-to one relationship between models

Please refer to here for general informatios about models.

If you want to define a "has one" reference between models

A field of the Reference type represents a "has one" relationship, and is loosely mapped on a database foreign key.

Example of Reference field:

Hair: Reference(Hair) PhysicalName: FK_GIRL_HAIR Fields: HairId: PhysicalName: HAIR_ID Fields of this type have a Fields subnode containing all fields that make up the key to the other model. These fields only need names, as their data types and other properties are taken from the corresponding fields in the referenced model's primary key.

Clone this wiki locally