Hi Dennis, Thanks again for your test-case. It was easy to reproduce the issue you were having with it. Here are a couple of observations:
- The Converter is properly registered by the time the trigger is called. - Registered Converters are not (yet) active when using POJO mapping through Record.into(). This is a pending feature request: https://github.com/jOOQ/jOOQ/issues/2029 Your use case could be quick-fixed by trying to look up custom converters in methods like Record.getValue(xx, Class). However, the way converters work right now, it is non-trivial to get this right, as converters are registered statically from generated code, i.e. when DataType.asConvertedDataType() is called. This design is insufficient for a more general, automatic data type conversion scenario, so I prefer not to fix this issue before finding a better solution for the Converter registry. I might call for feedback on this user group in a separate thread. As an immediate solution to your issue, I suggest you do not use Record <-> POJO mapping in your H2 trigger implementation. I.e., instead of final Test record = result.fetchOneInto(Test.class); Write final Record record = result.fetchOne(); Cheers Lukas 2013/4/14 Lukas Eder <[email protected]>: > Great, thanks Dennis! > I hope to have some time soon, to have a deeper look at what's going on! > > Cheers > Lukas > > 2013/4/14 Dennis Fischer <[email protected]>: >> Okay, there ya go (eclipse maven project with 3 classes + generation xml >> file + generated classes). 2 "test-methods". >> https://docs.google.com/file/d/0B2I0gRD-ClFRMWhCREJlZGtFWnM/edit >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
