Adds #onDuplicate hook into Record.
Fixes syntax error when using H2 database.