Hi. I got a problem with Entity Framework 4.0
I have a hierarchical table Category: Id, Name, ParentCategory_Id, timestamp
The "timestamp" field is marked as "Concurrency Mode" = "Fixed"
And I'm using Self-Tracking Entity "Category" to manage Category entity in my MVC application.
The situation:
- I create STE "NewCategory",
- set field Name='bla-bla'
- create new STE "ParentCategory" like this:
var ParentCategory = new Category{Id=45}; ParentCategory.MarkAsUnchanged(); NewCategory.Parent = ParentCategory;
- Call ApplyChanges() method in my STE Context and call SaveChanges()
- The Query is "Update Category set Name=...." !!!!!!
If I do NewCategory.Parent = null
OR set "Concurrncy Mode" = "Node"
in model scheme everything works FINE.
How to use hierarchical data with concurrency check ?