You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description
When executing a prepared statement, and adding the "RETURN_GENERATED_KEYS" flag, if I call executeUpdate(), for that query, I get this error in the console: java.sql.SQLException: Query returns results. This is due to the fact I have a RETURNING statement, as with the RETURNING removed it works and inserts the item into the database. Desirably I should be able to run my insert and then return the id, but this doesn't seem possible.
Unsure this is a bug or if I am doing something wrong here? I attempted this with executeQuery() instead, however, that did not throw an error or insert into the database. Additionally, removing the RETURN_GENERATED_KEYS flag also results in the Query returns results error.
Bug Description
When executing a prepared statement, and adding the "RETURN_GENERATED_KEYS" flag, if I call
executeUpdate()
, for that query, I get this error in the console:java.sql.SQLException: Query returns results
. This is due to the fact I have aRETURNING
statement, as with theRETURNING
removed it works and inserts the item into the database. Desirably I should be able to run my insert and then return the id, but this doesn't seem possible.This is the code:
Unsure this is a bug or if I am doing something wrong here? I attempted this with
executeQuery()
instead, however, that did not throw an error or insert into the database. Additionally, removing theRETURN_GENERATED_KEYS
flag also results in theQuery returns results
error.Schema For Reproduction
Environment
The text was updated successfully, but these errors were encountered: