I have code that retrieves one record of 2 objects(POJO generated by JooQ) from 2 tables.
Record record = dsl.select()
.from(ISSUE)
.leftJoin(CLIENT).on(CLIENT.ID.eq(ISSUE.CLIENT_ID))
.where(ISSUE.ID.eq(id))
.fetchOne();
JIssue jIssue = record.into(JIssue.class);
JClientRecord jClient = record.into(JClientRecord.class);
Both table ISSUE and table CLIENT have PK field "ID".
The problem is when mapping into(POJO.class), table fields that have same names not mapped correctly to POJO. In example above jIssue takes id of jClient.
When using TableRecords instead of POJO's all mapping done correctly, but you cant use TableRecord in generated DAO, it takes generated POJO.
How can i solve this problem so jooq could map to generated pojo fields correctly?