Unable to determine a valid ordering for dependent operation

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
mservidio
Posts: 14
Joined: Mon 26 Jul 2010 19:46

Unable to determine a valid ordering for dependent operation

Post by mservidio » Wed 28 Jul 2010 14:58

I am receiving the following error when calling SaveChanges().

Unable to determine a valid ordering for dependent operations. Dependencies may exist due to foreign key constraints, model requirements, or store-generated values.

I believe this is caused by some circular references in the database? Could someone confirm? Also, what is the simplest work around for this issue when using entity framework if there are some circular joins that for one reason or another need to keep.

Thanks,
Mark

mservidio
Posts: 14
Joined: Mon 26 Jul 2010 19:46

Post by mservidio » Wed 28 Jul 2010 15:51

I figured the issue, it was happening because there was a column that had the StoreGeneratedPattern option turned on, and one of the non-nullable fields wasn't being populated. It seems that the error message was very vague and just didn't describe this fully.

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

Post by AndreyR » Thu 29 Jul 2010 15:51

The similar problem was discussed here.
This error message is produced by Entity Framework rather then from our code.

Post Reply