Entity Framework 4.0 RC - Problem in many-to-many
Posted: Wed 03 Mar 2010 13:45
I'm using the Oracle doConnect 5.55 beta and I'm stuck at a problem.
My model is basically 2 entities (Role and User) linked together by a table that stores both table's ID fields.
When I do someRole.Add(someUser) or someUser.Roles.Add(someRole) I get the following exception when I run SaveChanges() on the Entity Framework model:
{"ORA-01400: cannot insert NULL into (\"AM\".\"AM_USER_ROLES\".\"ID_USER\")\nORA-06512: at line 4"
My user has been retrieved from the DB correctly and of course has an ID with a proper value. As the many-to-many associations in EF 4.0 are "automagic", I can't find anything wrong in my code and suspect a bug in Oracle dotConnect.
My model is basically 2 entities (Role and User) linked together by a table that stores both table's ID fields.
When I do someRole.Add(someUser) or someUser.Roles.Add(someRole) I get the following exception when I run SaveChanges() on the Entity Framework model:
{"ORA-01400: cannot insert NULL into (\"AM\".\"AM_USER_ROLES\".\"ID_USER\")\nORA-06512: at line 4"
My user has been retrieved from the DB correctly and of course has an ID with a proper value. As the many-to-many associations in EF 4.0 are "automagic", I can't find anything wrong in my code and suspect a bug in Oracle dotConnect.