Hi David,
Thanks for your message.
Some RDBMS support nullable primary keys. Others support deferred constraints (which jOOQ is currently unaware of), and even if both things are not supported, there might still be an identity or a trigger-generated value in your primary key constraint, in case of which it is not unreasonable to have null values prior to inserting a record. In addition to that, you could be left-joining a table, and its primary key column values would be null for this result set, despite them not being null in the database. This is no different from what we've discussed before on this list:
I'm aware that we might be discussing an 80/20 situation here. In 80% (or even more) of the cases, what you're expecting is reasonable, and you're willing to risk running into NPEs in those 20% of the cases I've mentioned above (or even less). We will be offering additional flags in the code generator, which allow you to override this behaviour in the future:
But for now, the correct way is the only way.
Thanks,
Lukas