Entity insert fails on Oracle 12c database when trying to use IDENTITY id generation strategy with hibernate.globally_quoted_identifiers=true.
The same works fine if I set
and change DDL correspondingly to:
When debugging the error I noticed that oracle.jdbc.driver.AutoKeyInfo#getReturnParamTypeCode tries to find "id" (with quotes) in an array of columns without quotes oracle.jdbc.driver.AutoKeyInfo#tableColumnNames. The array must be retrieved directly from database by the driver itself (to prove that I added a new column Hibernate is not aware about and that column was included into the array) and the quoted column must be coming from Hibernate.
Note that with the same driver version and DDL (with and without quotes) I am able to run native queries via java.sql.Connection#prepareStatement.
Also when I tried lowercase table name @Table(name = "company") with global quoting option and corresponding changes in DDL have been made I got another error:
Even though the errors seem to be different they might have something in common.
Oracle Database 12c Release 220.127.116.11.0