Working with jOOQ synthetic objects
jOOQ synthetic objects is a powerful and exciting feature introduced in version 3.14 that reveals its full usability with database (updatable) views, databases that you cannot but want to alter, and legacy databases that have some missing parts. By missing parts, we mean identities, primary keys, unique keys, and foreign keys that simply don't exist, or do exist but are not enabled or reported by the database (and are not present in the database metadata). The jOOQ Code Generator can tackle this aspect by producing synthetic objects that emulate these missing parts. Let's adopt the learning by example technique to see how synthetic objects work.
Synthetic primary/foreign keys
Let's consider that we have the following two database views (in PostgreSQL):
CREATE OR REPLACE VIEW "customer_master" AS SELECT "customerdetail"."city", "customerdetail"...