Hello,
I've recently tried to create/insert a new record using jooQ.
Below is a sample of the code I've tried running.
Record record = dslContext.insertInto(IS_WINGS)
.set(IS_WINGS.BUILDING_PART, "TST")
.set(IS_WINGS.WING_DESCR, "Insert Test")
.returning(IS_WINGS.BUILDING_PART)
.fetchOne();
The table (IS_WINGS) and the columns are all verified to be valid. I am able to add new records via database applications (such as sql developer) using the same credentials as used for JooQ, meaning authentication or access rights aren't a problem. I was also able to add the record in the example by replacing .returning.... with .execute. As soon as I add the .returning, I get an exception.
The exception is as followed:
Caused by: java.sql.SQLSyntaxErrorException: ORA-04043: object "CORP" does not exist
"CORP" is the schema where the tables I'm using are located in and it obviously does exist.
The error showing the executed SQL is as followed:
Caused by: org.jooq.exception.DataAccessException: SQL [insert into "CORP"."IS_WINGS" ("BUILDING_PART", "WING_DESCR") values (?, ?)];
The strange thing is, this SQL is valid and works when entered through a database application. I am also able to perform any other actions (update, delete, etc) just fine.
The tables used (static variables in code) are generated by JooQ itself.
Any help on this issue would be greatly appreciated!