What is the correct way to map an one-to-one association?
For example: association where each Person can have 0 or 1 Address associated and an each Address must be associated with only one Person.
Classes:
TAddress = class
strict private
FCity: String;
FStreetAddress: String;
FZipCode: String;
public
property StreetAddress: String read FStreetAddress write FStreetAddress;
property City: String read FCity write FCity;
property: ZipCode: String FZipCode write FZipCode;
end;
TPerson = class
strict private
FId: Integer;
FName: String;
FAddress: TAddress;
public
property Id: Integer read FId write FId;
property Name: String read FName write FName;
property Address: TAddress read FAddress write FAddress;
end;
Regards