Ok this is what i need to model...
I have 2 objects, that can exist seperately - lets say man and woman, neither needs to know about the other. But once they get get "married" it can only be married to each other.
In other words, I'm trying to create 2 tables, 1 table has a FK to the other, that is NULLABLE. When i try to set the relationship to 1-to-1 via the dmbl, it wont let me - which makes sense.
Ultimate i want to
- create a women (no knowledge of a man) Woman = new Woman{ Name = "Jane", Id = 1 };
- create a man (no knowledge of woman) Man = new Man{ Name = "John", Id = 1, WomenId = null};
But when i hook up the Man to Women...id like to be able to do something like this
Man.WomanId = 1;
SubmitChanges();
Man.Woman.Name = "Jane"
Is this even possible? If i do a one-to-many - how can i make it act this way? At the business layer? create a partial class and override stuff?
Hope this makes sense :P