Hi,
is there a way to retrieve the "underlying value" of a field, ie the value that the field had when last loaded or instanciated ?
What i mean : i have an entity with a field "Locked" true/false. Default the value is false. When the value is true, it means no changes can be written to the record.
In my gui code, the field is databound to a checkbox.
The possible entity lock-states are :
i have a new enity -> locked = false : user can make changes to whatever fields (also the "locked" field) and save the entity
i have a loaded entity with locked = false : see above
i have a loaded entity with locked = true : my custom validator will reject validation with reason "no locked entity may be changed", UNLESS the user has changed the locked checkbox to false.
So my validator needs to have the two states: the current state (i have that from the databound checkbox) and the "original" state ..how can i retrieve that original state from LLBL ? Or do i just customize the entityclass, and add some properties to set it mysellf (where?) when i load an entity ? Kind of like :
entity = new entity("PK"),
entity.OriginalLockState/*custom property*/ = entity.LockState/*database field*/;