Hi, 

I may be misremembering this but I thought I saw that there was a jOOQ or 
lambda jOOQ update that you could use to get the id of a row from a lookup 
table or add it as a new entry to the lookup table and return the new id?

What I would like to do is cache the data from the lookup tables (they're 
relatively small) then insert into the Table1 and for each field get the K 
of the existing V or insert the V and get a new K.

This is what I tried:

LookupTableRecord r = 
context.insertInto(LOOKUPTABLE).columns(LOOKUPTABLE.VALUE).values(myV).onDuplicateKeyIgnore().returning().fetchOne();

but the onDuplicateKeyIgnore is nulling out the returning() function as 
nothing is coming back.

Thanks.

P.S. LookupTable.ID does have a PREINSERT trigger to create a new K ... and 
there is a UNIQUE index on V.

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