Hello Lukas,
yes, the FkExecuteListener i wrote is a "poor-mans-solution" :)
thanks for mentioning all the points that Policies are covering.
I will keep this in mind to mention in my team as soon as jooq is used in our product for some time
(if i can convince my colleagues to use jooq instead of hibernate that is / in my old company we already used jooq),
and make sure it is clear, that my current solution does not cover those cases.
I checked the generated Schema / Catalog instances and found no problem in getting all generated tables, and searching for the field in them,
so i'm conviced that the Policy Feature would be good to use as it is for me. If you want you can close your ticket, as it seems everything i need
would work with the Policies.
While saying this, i take into account that in a multi-module setup, there would be separated project for the Codegen, Core, Subprojects ,...
- codegen-project (generates code for database1, database, ...)
- core-project (defines a common DSLFactory that creates the Jooq Configuration and from that, the Jooq DSLContext object)
- project1 (uses the core-project and only database1, and would need to write a Project1DSLFactory, that creates Policies specific for database1 / project1)
- project2 (uses the core-project and only database2, and would need to
write a Project2DSLFactory, that creates Policies specific for
database2 / project2)
- server1 (uses project1 and provides rest-endpoints and defines evolutions with liquibase for database1)
- server2 (uses project2 and provides rest-endpoints and defines evolutions with liquibase for database2)
with outlining such (example) dependencies between projects i want to say, that the codegen-project containing the Schema / Catalog ist often
defined separately from the projects that are depending on its generated Schema / Catalog instances, and that we normally strive to keep database-specific
generated classes out of the database-independent core-projects, but its often not possible and also not really necessary.