I'm migrating some tables from a DB to another (MySql 5.7, jOOQ 3.10), and using the following code to insert:
try {
myDatabase
.loadInto(MYTABLE)
.onErrorAbort()
.batchAll()
.loadRecords(rows)
.fields(MYTABLE.fields())
.execute();
} catch (Exception e) {
e.printStackTrace();
}
This table has a FK constraint to another table, and the insert works if the other table is populated. However, if I don't populate the other table first, I don't get any errors, the program completes 'successfully', but no rows are inserted.
Trying to execute the same insert via terminal/datagrip gives me the expected FK error
Edit: also tried with .onErrorAbort() (added to the sample code)