The error you experience is expected with the following setup:
- nullable foreign key of the child table in the database;
- not nullable foreign key property of the child class in the domain model;
- a new object of the child class is added to the context with a non existing value for the foreign key property (for example: 838320);
In this case, you can resolve it by making sure that the foreign key of the child table is nullable in the database, updating the class from the database with the help of the Update From Database wizard, and leaving the foreign key property of the new instance unassigned.
I hope this helps. If the described scenario does not match yours or the error persists, do not hesitate to get back to us.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map