Everyone, I really need an answer to this quickly. In another table I had a 
workaround in that I would query the URI value, which was unique, and it 
would return me the ID. Very inefficient, but workable.

But now I have another table that does not have any unique values other 
than the generated ID. So if RETURNING doesn't work, how can I find out the 
ID that was generated?

I should be able to use CURRVAL <http://stackoverflow.com/a/2944481/421049>, 
and indeed 
DSLContext<http://www.jooq.org/javadoc/3.3.x/org/jooq/DSLContext.html>seems to 
have a currval(), but it requires a Sequence. Where do I get a 
sequence? I don't seem to be able to do this:

...sequenceByName("entity_id")

It seems there is also a LASTVAL, but DSLContext doesn't have a lastVal(). 
It has a lastID(), but the documentation says it is not supported on 
PostgreSQL.

So I'm stuck. Why is something so simple so hard?

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

Reply via email to