Hello,

> TABLERecord r = factoryObj.newRecord(TABLE);
> r.set(...);
> r.store();
> // r is already updated with the automatically generated ID

True, that is another (probably better) option

> I had an error on the primary key being null, probably because I
> instantiated a record as a regular Object: new TABLERecord(), and in doing
> so the primary key was automatically set to null, leading to the error.
>
> I hope my mistake will be useful to others.

Hmm, in general, this should work... So, let's see if it was "your
mistake" or a bug. Do you use a serial / auto_increment / sequence
with trigger for your primary key? Can you show the table's DDL and
the Java code that caused the null-related error?

Cheers
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/groups/opt_out.


Reply via email to