Page 1 of 1

Unable to determine a valid ordering for dependent operation

Posted: Wed 28 Jul 2010 14:58
by mservidio
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

Posted: Wed 28 Jul 2010 15:51
by mservidio
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.

Posted: Thu 29 Jul 2010 15:51
by AndreyR
The similar problem was discussed here.
This error message is produced by Entity Framework rather then from our code.