I am moving from Jooq 3.14.16 to Jooq 3.19.10
I am using codegen tool to generate Java source for jooq entities.
In the Postgres DB schema there are several tables and one of them is named object
.
After moving to Jooq 3.19.10, generated entities fail to compile with error “method does not override or implement a method from a supertype”.
Steps to reproduce:
Create atleast 2 tables, one of them with name object
, as;
CREATE TABLE jooqtest.account (
id INT,
details VARCHAR(32)
);
CREATE TABLE jooqtest.object (
obj_id INT,
details VARCHAR(32)
);
In tables/Account.java method override looks like below,
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Account where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
Whereas, in tables/Object.java it looks like,
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Object where(@Stringly.SQL String condition, java.lang.Object... binds) {
return where(DSL.condition(condition, binds));
}
Here the Object in Account class is not able to resolve to java.lang.Object
Hence compiler throws error.
Kindly suggest if there is any way to resolve it without renaming tables in DB?
I have provided Steps to Reproduce above.
I am expecting to resolve compiler error via some settings in codegen, without renaming tables in my existing DB.
Shyama Praveena is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.