Im just striking out today...
I took out all the hierarchies...
But still have the table structure...
Person (this table is replicated)
CONSTRAINT PK_Person PRIMARY KEY NONCLUSTERED (personid)
Employee
CONSTRAINT PK_Employee PRIMARY KEY CLUSTERED (personid)
CONSTRAINT FK_Employee_Person FOREIGN KEY (personid)
REFERENCES Person (personid)
Manager
CONSTRAINT PK_Manager PRIMARY KEY CLUSTERED (personid)
CONSTRAINT FK_Manager_Employee FOREIGN KEY (personid)
REFERENCES Employee (entity_id)
Im trying to simple insert into Employee and i get "Cannot insert the value NULL into column 'personid', table 'Employee'; column does not allow nulls.
Employee employee = new Employee();
employee.IsNew = true;
employee.personid = id;
employee.employestuff = stuff;
adapter.SaveEntity(employee);
Am i missing something, is this a bad table design? Im not sure what the problem is with this. I traces the id that personid is being set to and ensured it had a value.
Nevermind, personid was marked as identity in the designer. I unchecked it and this fixed the problem.
Thanks