Hi Kamal,

Thanks for your message. I'll comment inline

2017-09-03 16:38 GMT+02:00 Kamal raj <[email protected]>:

> 1. Need to enable the OL in Jooq using  executeWithOptimisticLocking
> settings
>

Yes


> 2. Since OL in Jooq automatically throws / fails when see the concurrent
> modification, I believe its totally fine to run them in any transaction
> mode (note that I'm using Postgres here). My understanding here is that OL
> themselves hides the complexity of transaction. May be I'm wrong here.
> Please correct me.
>

Well, to get a completely accurate picture, the usual transaction anomalies
can still happen under non-serializable transaction isolation - although, I
cannot think of such an edge case right now.


> 3. How does Jooq knows which column it needs to watch while versioning
> under OL? The documentation from here : https://www.jooq.org/doc/2.
> 5/manual/sql-execution/crud-with-updatablerecords/optimistic-locking/
> says that, we can create a column called MODIFIED as a TIMESTAMP. But the
> question here is, how does the column mapping works w.r.t to OL?
>

Follow the link to the manual sections about the code generator
configuration. You can specify the columns to be used as version /
timestamp columns here:
https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-record-version-timestamp-fields


I hope this helps,
Lukas

-- 
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.

Reply via email to