ok, solved myself. Using jooq 3.8 is possible to pass to record.insert(xx) 
a Collection, so this method do the work of removing identity
preserving all fields except identity

Identity<?, ?> identity=rec.getTable().getIdentity();
return Stream.of(rec.fields())

Il giorno giovedì 13 ottobre 2016 17:27:53 UTC+2, Denis Miorandi ha scritto:
> Hi,
>       I'm using dslCtx.createNewRecord(TABLE) to create a record, mapping 
> from my objectgraph (not jooq pojos) to jooq record. Record is an 
> UpdatableRecord with IDENTITY.
> Issue is my mapper map also KEY/IDENTITY that is null so operation that is 
> an insert (due to null key) fail cause jooq specify ID on an identity table.
> Question is modify my mapper the only way (avoiding to place identity 
> field on record if value is null) or
> are there some other way to do automatically before record.insert(), i.e. 
> removing identity field from record?
> All in all can I remove a field from jooq record?
> Denis

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 jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to