Environment: Spring using JOOQ 3.7, automatically generating JOOQ conversion code from the schema, using Postgres as my database.
I was porting some code from Hibernate to JOOQ. Hibernate code retrieves some authentication information hidden based on each context to populate fields such as "createdBy", "updatedBy", dates, etc.
The only way I can do this with JOOQ at the moment is that the developers had to memorize the code for updating the fields manually each time they update the object, and I see that it will be tiring and easy to forget to fill out fields.
Using JOOQ, is there any way to deal with the “history fields” on each table better than writing a bunch of code manually?
We do not use DAO at the moment, I would prefer not to write / generate the entire code layer in order to deal with these history fields.
Another option would be to do this in the database, and if JOOQ does not help with this problem, it could be what we will do.
source
share