Hello, Thanks a lot for your message. I remember having seen a similar issue with INSERT .. RETURNING in Oracle, but cannot seem to find it right now. If I remember correctly, there was a bug in the ojdbc driver when using Statement.getGeneratedKeys(). May I ask you to provide:
- The Oracle server version - The ojdbc driver version - The jOOQ version Thanks, Lukas 2018-01-23 10:41 GMT+01:00 <[email protected]>: > 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! > > > > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
