jOOQ / jOOQ

jOOQ is the best way to write SQL in Java
https://www.jooq.org
Other
6.11k stars 1.2k forks source link

Missing ExecuteListener#exception() events on RETURNING clauses #8881

Open lukaseder opened 5 years ago

lukaseder commented 5 years ago

Just as with #8877, the various fetchOne() methods on DML RETURNING clauses do not properly call back ExecuteListener.exception() events in case there is a TooManyRowsException.

Unlike #8877, this is rather difficult to fix, which is why there's a separate issue.

Also affected (will possibly be fixed in a different issue): UpdatableRecord.fetchChild() and UpdatableRecord.fetchParent()

lukaseder commented 3 years ago

AbstractDMLQuery still needs quite the refactoring to make this possible. The more important problem is that fetchOne() doesn't use lazy execution, but eagerly fetches all rows into memory, see: https://github.com/jOOQ/jOOQ/issues/11968.

This isn't trivial to fix...

lukaseder commented 1 year ago

This should be fixed automatically with https://github.com/jOOQ/jOOQ/issues/15157