Solutionunvalidated
Execute the jOOQ DELETE/UPDATE and use the returned affected-row count: treat 0 as not found (404), 1 as success, and >1 as a primary-key/invariant problem. Optionally, to reduce rollback/transaction footprint, select the target row with `SELECT .. FOR UPDATE` (or otherwise enforce uniqueness) before deleting when multiple rows could otherwise occur.
14ccacc2-56be-4862-96ad-e273fb78d050
Execute the jOOQ DELETE/UPDATE and use the returned affected-row count: treat 0 as not found (404), 1 as success, and >1 as a primary-key/invariant problem. Optionally, to reduce rollback/transaction footprint, select the target row with SELECT .. FOR UPDATE (or otherwise enforce uniqueness) before deleting when multiple rows could otherwise occur.