jOOQ / jOOQ

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

MockDataProvider doesn't correctly supply generated ID #6576

Open lukaseder opened 7 years ago

lukaseder commented 7 years ago

When using UpdatableRecord.store() via a MockDataProvider, we should be able to produce a generated ID (and other column values). This doesn't seem to work.

See also:

chaundhyan commented 7 years ago

Thanks Lukas

mertergun commented 6 years ago

up 👍

Quick debugging pointed me to below suspicious line. This could be the source of the issue. Unless you have a reason to check result[resultIndex].data == null, could it be removed ?

https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockStatement.java#L229

lukaseder commented 6 years ago

@mertergun: Just removing that might produce side effects. The actual fix might involve more changes.