diff --git a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java index b5d372950a..4b38ecf3b9 100644 --- a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java +++ b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java @@ -137,13 +137,12 @@ public interface UpdatableRecord> extends TableReco *

* jOOQ can auto-generate "version" and "timestamp" values that can be used * for optimistic locking. If this is an {@link UpdatableRecord} and if this - * record returns fields for either - * {@link Table#getRecordVersion()} or - * {@link Table#getRecordTimestamp()}, then these values are set - * onto the INSERT or UPDATE statement being - * executed. On execution success, the generated values are set to this - * record. Use the code-generation configuration to specify naming patterns - * for auto-generated "version" and "timestamp" columns. + * record returns fields for either {@link Table#getRecordVersion()} or + * {@link Table#getRecordTimestamp()}, then these values are set onto the + * INSERT or UPDATE statement being executed. On + * execution success, the generated values are set to this record. Use the + * code-generation configuration to specify naming patterns for + * auto-generated "version" and "timestamp" columns. *

* Should you want to circumvent jOOQ-generated updates to these columns, * you can render an INSERT or UPDATE statement @@ -163,10 +162,10 @@ public interface UpdatableRecord> extends TableReco *

* This is the preferred way of using optimistic locking in jOOQ. If this is * an {@link UpdatableRecord} and if this record returns fields for either - * {@link Table#getRecordVersion()} or - * {@link Table#getRecordTimestamp()}, then these values are - * compared to the corresponding value in the database in the - * WHERE clause of the executed DELETE statement. + * {@link Table#getRecordVersion()} or {@link Table#getRecordTimestamp()}, + * then these values are compared to the corresponding value in the database + * in the WHERE clause of the executed DELETE + * statement. *

  • Without any specific column configurations *

    * In order to compare this record with the latest state, the database @@ -202,6 +201,13 @@ public interface UpdatableRecord> extends TableReco * WHERE [key fields = key values] * AND [version/timestamp fields = version/timestamp values]

  • * + *

    + *

    Statement execution enforcement

    + *

    + * If you want to enforce statement execution, regardless if the values in + * this record were changed, you can explicitly set the changed flags for + * all values with {@link #changed(boolean)} or for single values with + * {@link #changed(Field, boolean)}, prior to storing. * * @return 1 if the record was stored to the database. 0 * if storing was not necessary. @@ -219,6 +225,11 @@ public interface UpdatableRecord> extends TableReco *

    * This is the same as {@link #store()}, except that an INSERT * statement (or no statement) will always be executed. + *

    + * If you want to enforce statement execution, regardless if the values in + * this record were changed, you can explicitly set the changed flags for + * all values with {@link #changed(boolean)} or for single values with + * {@link #changed(Field, boolean)}, prior to insertion. * * @return 1 if the record was stored to the database. 0 * if storing was not necessary. @@ -233,6 +244,11 @@ public interface UpdatableRecord> extends TableReco *

    * This is the same as {@link #store()}, except that an UPDATE * statement (or no statement) will always be executed. + *

    + * If you want to enforce statement execution, regardless if the values in + * this record were changed, you can explicitly set the changed flags for + * all values with {@link #changed(boolean)} or for single values with + * {@link #changed(Field, boolean)}, prior to updating. * * @return 1 if the record was stored to the database. 0 * if storing was not necessary.