Hi all,

I'm just starting to use jOOQ and the first thing that I did was basically 
something like this (after creating bindings with the generation tool):

MyRecord myRecord = dslContext.newRecord(MYTABLE, pojo);

dslContext.execteInsert(myRecord);

It's very convenient, but if the POJO does not have a field/getter 
method/annotation matching a given field, then the field simply will not be 
updated. Is there a way to force the insert/update to fail if a field 
cannot be found (other than making the field NOT NULL in the schema, which 
would be a hack and wouldn't work for updates, anyway)?

There is a way of handling duplicate keys (update or ignore), as described 
here http://blog.jooq.org/tag/on-duplicate-key-update/, but it lacks the 
convenience and flexibility of DSLContext.executeInsert(Record).

Is there a way to insert a record generated from a POJO dynamically as in 
my pseudocode above and handle the possible duplicate key?

Thanks,

Sergei

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