Closed
Description
When I use the returnGeneratedKeys
method with auto commit enabled then an error is emitted downstream. Namely, the code of this form
db.update("INSERT INTO table1(col1, col2, col3) VALUES(?, ?, ?)")
.parameters("param1", "param2", "param3")
.returnGeneratedKeys()
.autoMap(MyClass.class)
.singleOrError();
correctly emits an inserted object but the following error is raised on completion:
org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled.
It looks like a flowable constructed by returnGeneratedKeys
performs a commit on completion and is oblivious to the fact that the underlying connection has auto commits enabled. Connection pools with auto commit enabled seem to be the default(?).
Am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels