Update Related Entities

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 9
Joined: Wed 26 May 2010 02:39

Update Related Entities

Post by jacksparrow » Wed 26 May 2010 02:48

We are using dotconnect for Oracle to generate our EDM for website.

The entities are detached since we pass them thru our service layer. We have a User table, with a foreign key to a Role table. When a User's role is updated the foreign key is not updated in the User Table.

The EDM generates a Role property and RoleReference property on the User Entity. When the SaveChanges method is called, the above two property changes are not propogated to the DB, since they are in Unchanged State (due to the dettached nature of the User Entity).

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 28 May 2010 07:44

You should attach the deserialized object to the context in order to use the benefits of change tracking.
More information is available here in MSDN.

Post Reply