One to one relation

Nov 23, 2009 at 6:58 PM

What´s the correct way to handle with one to one relation with Opf3? any sample?

Dec 9, 2009 at 8:26 PM

Two tables, one holds users for a website, the second table holds the address information for the users. This is how a relation looks in this scenario

[Relation( "ContactInfoId=Id", PersistRelationship = PersistRelationships.ChildFirst )]
private ObjectHolder<ContactInfo> _ContactInfoRelation = new ObjectHolder<ContactInfo>();
public ContactInfo ContactInfo
	get { return _ContactInfoRelation.InnerObject; }
	set { _ContactInfoRelation.InnerObject = value; }

Dec 11, 2009 at 3:28 AM
Edited Dec 11, 2009 at 3:28 AM

Perfect example. This would be the way on how to handle a 1:1 relationship. With a 1:1 you could also consider merging both entities?