Hi,
following happens with the latest version:
table Element (
Id UNIQUEIDENTIFIER PRIMARY KEY
)
table ElementName (
Id UNIQUEIDENTIFIER PRIMARY KEY,
ElementId UNIQUEIDENTIFIER NOT NULL -- this is an n:1 relation to table element
)
When I create a new Element entity I create within the cons a new ElementName entity
// more or less the thing I'm doing
Element(string name) : base() {
this.Id = Guid.NewGuid();
ElementName _elementName = new ElementName(name);
this.ElementName.Add(_elementName)
}
I would expect that the last line syncs the FK of the ElementName entity but it doesn't. When I commit this entities I get an exception that ElementName.ElementId cannot be null.
Both entities are newly created.
Christoph