Hello Sergey

> > 1. At this moment Record.from copies values from bean to record and does all
> > value "changed".
> > For example, we read fresh record from database and apply changes using
> > Record.from from some bean.
> > After that all fields including primary key marked as "changed" and
> > Record.store tries to insert record instead of update.
> > Is it reasonable copy only different values?
>
> Nice hint. I'll think about this. I agree that the primary key (or
> "main unique key") shouldn't be flagged as changed for the reasons you
> mentioned. I think this is checked elsewhere, already. [...]

After some analysis, I think this issue got introduced as a regression with
https://sourceforge.net/apps/trac/jooq/ticket/945

There was some subtlety involved with setting a value twice to the
same value, resulting in the changed flag to be reset. I guess the
above fix was wrong.

Cheers
Lukas

Reply via email to