JOOQ Code generation could take into account composite unique constraints

Viewed 56

Jooq - 3.13

We are using Jooq Codegen to generate using the org.jooq.meta.extensions.ddl.DDLDatabase generation strategy.

When I have a table ex: Employee with a unique key constraint on say employee_number (this column is not a primary key) it generates a very useful method fetchOneByEmployeeNumber however I cannot say the same about composite keys.

If there is a composite unique key on (department_id, employee_number) then I'd like a method findOneByDepartmentIdEmployeeNumber(Long departmentId, Long employeeNumber). Is this possible? (Obviously I can roll my own method for this purpose but we have quite a few of these constraints and auto generated methods will be very helpful)

1 Answers
Related