Changed fields aren't updated of the old and new values are the same

Posts   
 
    
Jeremy Driver avatar
Posts: 41
Joined: 08-May-2004
# Posted on: 17-Oct-2005 21:49:52   

Frans,

I remember that in old versions of LLBLGen Pro, a field was considered changed if its new value was the same as the old value. Isn't there a flag that toggles between the old behavior and the new behavior? I sure hope so, because I need the old behavior for my current project.

Thanks,

Jeremy

PS. I accidentally checked this message and can't uncheck it. Sorry. disappointed

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 17-Oct-2005 22:40:48   

No old behavior is present with a toggle. You can however use a combi of ForcedCurrentValueWrite and settign the field's IsChanged flag.

Frans Bouma | Lead developer LLBLGen Pro
Jeremy Driver avatar
Posts: 41
Joined: 08-May-2004
# Posted on: 17-Oct-2005 23:40:01   

Ok, that should work. Thanks for the fast respose!

Jeremy Driver avatar
Posts: 41
Joined: 08-May-2004
# Posted on: 18-Oct-2005 00:20:46   

Frans, I understand how and why I should set the IsChanged flag for each entity field before saving, but why do I need ForcedCurrentValueWrite?

Thanks,

Jeremy

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 18-Oct-2005 10:05:43   

Jeremy wrote:

Frans, I understand how and why I should set the IsChanged flag for each entity field before saving, but why do I need ForcedCurrentValueWrite? Thanks, Jeremy

Because that method writes the value, no matter what. I forgot to add, you can also use the CurrentValue property of the field object, and use that. It will write the value as well and set the IsChanged flag for you as well simple_smile (which should be even easier) simple_smile

Frans Bouma | Lead developer LLBLGen Pro