I have a couple of comments with regards to inserting records.
With JPA I have a sequence generator. Hibernate uses these like pools so
the generator skips a range of values.
Here are my questions:
1. Under JOOQ is their a performance advantage in replicating this
behavior?
2. If not, should I just change the field default to grab a sequence on
insert when the ID is null?
If I opt for #2 how do I insert a record and get the generated ID back? I
can see how to do it with a create.insert() query but I was hoping to
simply insert the JOOQ generated record I already have and that approach
does not allow a #returning chain. Then I hoped I could do something like
create.insert(TABLE).using(record).returning, etc. But if I do an "insert"
call then I cannot use my record as an object. So there is only the long
way around (adding calls to #values for each field in the record). But
again, I could EASILY be mistaken.
If it is recommended that I do #1, does JOOQ have any basic classes for
this? Or it is assume I will implement an ID server myself?
Thanks!
--
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.