Given:
CREATE TABLE foo (id BIGINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id));
I'd like to invoke: INSERT INTO foo VALUES()
and get back the generated key. I tried following the advice found at jOOQ insert query with returning generated keys but when I invoke:
RoomsRecord record = db.insertInto(foo, Collections<Field<?>>emptyList()).returning(foo.ID).fetchOne();
JOOQ returns null instead of the generated key. Is this a bug?