I've been asked to fix a problem with a WCF service that uses the entity framework for it's data access. Adds of a whole object work great, but updates fail because one object isn't being detected.
Object model is like so Parent -> Collection Of Children -> Collection of Children -> Child Object
The Child object is the one that isn't being saved. I see that it is in the added state in the ObjectStateManager, but because it's parent didn't change, the chan开发者_运维知识库ge doesn't seem to go to the database. If I add a new object to the Child Object's collection and a Child Object it picks up the change and saves it to the database, but if the parent collection doesn't change, it won't ever submit the changes to the database.
What am I missing?
精彩评论