My app does not require concurrency checking, a last in wins approach is fine for my situation. However, I've noticed that when navigation properties are changed in my entities the generated sql always includes the original values in the update's where clause, thus if the values have been changed then a concurrency exception occurs. How can I prevent this behaviour? There isn't an option to change the concurrency mode for navigation properties in the designer.
Unfortunately there's not a way to turn off concurrency checking for navigation properties in the first release of the EF. As part of EF4 we are introducing a new variation on associations which support foreign key properties in the model. With these relationships the FK properties are regular properties of the entities rather than being completely independent of the entities so the concurency checks are just whatever you have configured for the entities (which might be nothing). I don't know of any way to get around the association concurrency checks inthe first release of the EF.
- Danny
P.S. FK associations are not in EF4 beta 1, but they will be in the next release of EF4.This posting is provided "AS IS" with no warranties, and confers no rights.
Marked as answer byNazoTuesday, June 30, 2009 6:56 AM
Unfortunately there's not a way to turn off concurrency checking for navigation properties in the first release of the EF. As part of EF4 we are introducing a new variation on associations which support foreign key properties in the model. With these relationships the FK properties are regular properties of the entities rather than being completely independent of the entities so the concurency checks are just whatever you have configured for the entities (which might be nothing). I don't know of any way to get around the association concurrency checks inthe first release of the EF.
- Danny
P.S. FK associations are not in EF4 beta 1, but they will be in the next release of EF4.This posting is provided "AS IS" with no warranties, and confers no rights.
Marked as answer byNazoTuesday, June 30, 2009 6:56 AM
That's disappointing but I guess things like this are to be expected in the first release. I'm looking forward to seeing what you've come up with for the next version.