Hi,
I am updating a bunch of records in the DB like this:
// fetch a bunch of records
records = ...
for (Record r : records) {
// update logic
r.store();
}
I hoped the UPDATE statement would be issued only if the record is
modified. However, it is issued every time a record is touched.
I
read:
https://blog.jooq.org/2017/06/28/orms-should-update-changed-values-not-just-modified-ones/
and that was pretty helpful to explain the difference.
Is it possible to get modified semantics with JOOQ? I could fix my code to
replace every setXYZ with if ... setXYZ but it will generate too much
boilerplate
Would doing something like:
if (!r.original.equals(r)) {
r.store();
}
at the end work in general case?
Thanks!
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.