Hello,
I'm very new to O/R mapping and somewhat new to .NET 2. I'm using LLBL v.2. I have a heirarchy such as this: Person > User. LLBL see's this as a TargetPerEntity inheritance in the design view. Person has one pk called 'Id', User has a column 'Id' as a foreign key to Person.Id. In Sql, User.Id is a primary key but is not an identiy column so as to allow inserts on this field.
I am trying to insert once into User and let LLBL take care of adding the needed record into Person and then User.
UserEntity c = new UserEntity();
c.Fname = "a"; // Person
c.Lname = "b"; // Person
c.UserName = "c"; // User
...
c.Save();
When I run this code, I get this exception:
An exception was caught during the execution of an action query: Cannot insert the value NULL into column 'Id', table 'Tracker.dbo.User'; column does not allow nulls. INSERT fails.
The statement has been terminated.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
Maybe I'm way off? Thanks for your help!