Print Page | Close Window

Edit object, save, edit and then reject changes reverts to value before save

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1975
Printed Date: 21-Apr-2026 at 3:54pm


Topic: Edit object, save, edit and then reject changes reverts to value before save
Posted By: jeejee
Subject: Edit object, save, edit and then reject changes reverts to value before save
Date Posted: 19-Jul-2010 at 7:24am
Hi,
 
I think there seems to be an issue with EntityAspect.RejectChanges. The case is as follows:
 
1. Load list into observablecollection from database (1 row with column "Name" = "test")
2. Edit the row and change "Name" to "test 123"
3. Save the row using SaveChangesAsync. This is all ok upto here. Save is persisted correctly
4. Edit the row again and change "Name" to "test 456"
5. Cancel the row edit by calling EntityAspect.RejectChanges() on the Entity row
6. The value in the database is correct ie. it has not been changed to "test 456" but the Entity cache seems to be holding onto the original value retrieved from the database ie. "test" and not the saved value "test 123"
 
Please could you advise if this is a known issue or whether there seems to be something missing.
 
Thanks
Jeejee
 



Replies:
Posted By: GregD
Date Posted: 19-Jul-2010 at 1:07pm
Jeejee:

This is a known bug and is fixed in the 6.0.4 release, due out later this week.



Print Page | Close Window