EF4.x STE: Entity State not changed if SubItem is changed

85 Views Asked by At

I create a client-server application in VB.NET 2010 with EF 4.x STEs.

If i change the Entity the State is setting correct. But I if I change a sub-item, then the Entity-State is not changed - only of the SubItem.

How I must modified the tt-Templates so "see" changes in the whole entity-graph?

1

There are 1 best solutions below

2
Ladislav Mrnka On BEST ANSWER

That is the correct behavior. Otherwise any change in entity would propagate modification flag into whole entity graph if navigation properties are bidirectional. The State is not for you to understand if something has changed but for EF to understand what exactly has changed to generate correct SQL commands.