Original Version

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 25-Oct-2005 18:38:24   

Hi,

I understand that an entity keeps track of which fields have changed their value. But does an entity instance retain the original values like a DataRow deos?

Cheers, I.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 25-Oct-2005 18:40:41   

Ian wrote:

Hi,

I understand that an entity keeps track of which fields have changed their value. But does an entity instance retain the original values like a DataRow deos?

Cheers, I.

No. You can however make sure the originals are saved, by calling entity.SaveFields(name). This will preserve the fields under the name 'name' and you can rollback later.

Every field contains a DbValue property which contains the value when it was read from the db (if fetched) or null if the entity wasn't fetched.

Frans Bouma | Lead developer LLBLGen Pro