Oleg, maybe we're a bit out of sync here... :) 2015-06-05 15:15 GMT+02:00 Oleg Kuznetsov <[email protected]>:
> Hi Lukas, > > I completely agree with your point, but it does not equal to mine :) > > assertFalse(record.get(record.changed(TABLE1.DATE1))) - this is correct > to me. > How does this work? record.change(Field<?>) returns a boolean, and there's no record.get(boolean) method. At least not in jOOQ's API... > But as a user of JOOQ, I expect that if column is not changed in record, > then update SQL generated on this record will not contain 'SET date1 = > null'. > Absolutely, and we've implemented that (according to our understanding) in 3.6.0: https://github.com/jOOQ/jOOQ/issues/4161 But the point here is: What do you mean by "column is not changed"? The record's setter for a field is called: setValue(). This will always set the "changed" flag to true for that column, regardless if the value "changes". There are several reasons for this: 1. You may have triggers that depend on this 2. You may want to omit DEFAULT expressions from applying 3. You may want to enforce a certain type of SQL statement, to prevent excessive hard-parsing of different possible insert / update statement combinations. This can help prevent cursor cache contention, e.g. in Oracle So, do we mean the same thing when we say "changed" ? -- 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.
