New Posts New Posts RSS Feed: Change Tracking Not Working
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Change Tracking Not Working

 Post Reply Post Reply
Author
c63205 View Drop Down
Newbie
Newbie


Joined: 28-Dec-2010
Location: Houston, TX
Posts: 10
Post Options Post Options   Quote c63205 Quote  Post ReplyReply Direct Link To This Post Topic: Change Tracking Not Working
    Posted: 26-Mar-2011 at 10:00pm

I'm having issues where some Entities and change tracking.  When I update the entity's data fields, the entity state remains "unchanged" rather than "modified".  I am not able to reproduce this in another solution yet.

Does anyone know what factors could result in this behavior?
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 28-Mar-2011 at 1:51pm
Hi c63205;

An entity's state will change from "modified" to "unchanged" if you have called EntityManager.AcceptChanges, EntityManager.RejectChanges or EntityManager.SaveChanges (or SaveChangesAsync). Maybe you could check if you're calling any of these methods in places you don't intend to.

I can give you better suggestions if you could provide more information on how you're seeing this weird behavior, i.e. what kind of tests or observation that you do that led you to conclude the entity's state remains "unchanged" after an update to the data fields.

And I'm assuming you're not using DevForce POCO's correct? http://drc.ideablade.com/xwiki/bin/view/Documentation/poco
Back to Top
c63205 View Drop Down
Newbie
Newbie


Joined: 28-Dec-2010
Location: Houston, TX
Posts: 10
Post Options Post Options   Quote c63205 Quote  Post ReplyReply Direct Link To This Post Posted: 28-Mar-2011 at 2:36pm
The state doesnt change the moment i modify the field.  im in the debugger view.  no pocos.  this behavior is sporadic.
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 28-Mar-2011 at 2:43pm
Can you do something similar to below right after you modify the field?

var newState = YourEntity.EntityAspect.EntityState.

Is newState still unchanged?


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down