-
I have a PostgreSQL table similar to: create table item (
id uuid default gen_random_uuid() primary key not null,
name varchar,
created_at timestamptz not null default current_timestamp,
); If I use the generated DAO to insert an item I see a related issue #10386 is closed as won't fix, but that seems to be talking exclusively about blank inserts (with nothing but default values). But I may be misunderstanding it. Is what I'm seeing the expected behavior? Anything I can do to make the default timestamp apply? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for your message and for your patience. The discussions don't seem to be part of our "open questions" report yet, which is why this hasn't been answered yet. If jOOQ knows about both your |
Beta Was this translation helpful? Give feedback.
Thanks for your message and for your patience. The discussions don't seem to be part of our "open questions" report yet, which is why this hasn't been answered yet.
If jOOQ knows about both your
NOT NULL
constraint as well as theDEFAULT
expression, then there shouldn't be any explicitNULL
values in theINSERT
statement. Possibly a bug. May I ask you to report one here, along with a complete reproducer? https://www.jooq.org/doc/latest/manual/sql-building/model-api/model-api-replacement/