I've run into trouble updating existing records which I've stored in a 
cache.

Background: I fetch some records from the database and then convert them to 
POJOs to make sure no references to the factory/connection/datasource are 
kept alive in the cache. This means the PK column is copied.

When I want to update such a records, by creating a new record and updating 
it's columns with the values from the POJO, I get a PK collision because 
jOOQ assumes that this is a new row (because I have to call the setter for 
the PK column).

Looking at the code, I haven't found a way to convert a POJO to a record 
and get an UPDATE during store(). Is there one? I'd rather avoid reading 
the record again from the DB to update columns.

Regards,

A. Digulla

Reply via email to