Now it makes sense why I cannot find any example. Thanks. On Friday, June 30, 2017 at 4:28:54 AM UTC-4, Lukas Eder wrote: > > Hello, > > The behaviour of DefaultRecordMapper can be inverted through the following > methods: > > - DSLContext.newRecord(Table, Object): > https://www.jooq.org/javadoc/latest/org/jooq/DSLContext.html#newRecord-org.jooq.Table-java.lang.Object- > - Record.from(Object): > https://www.jooq.org/javadoc/latest/org/jooq/Record.html#from-java.lang.Object- > > If you want to revert the behaviour of a custom RecordMapper, you'll have > a solution in jOOQ 3.10, as we'll (finally) support the new RecordUnmapper > API: https://github.com/jOOQ/jOOQ/issues/2520. > > Currently, you'll have to roll your own unmapping. > > I hope this helps, > Lukas > > 2017-06-29 16:52 GMT+02:00 <[email protected] <javascript:>>: > >> >> Hello all, >> >> I'm trying to come up with a Factory that I can use to convert a POJO >> back to a Record so that we can apply some business rules and update the >> original record. >> >> If I'm not reading the javadocs wrong DefaultRecordMapper and or custom >> RecordMapper will do the job, but I cannot for the life of me find an >> actual example of code that uses it to do the conversion from POJO to a >> Record. >> >> A simple example of a DAO usage that we currently have, which we'd like >> to remove the dependency on. >> >> @Override >> public class update (Table table, User user) { >> MyTableDao dao = new MyTableDao(jooqConfiguration); >> table.setLastUpdatedBy(user.getId()); >> dao.update(assessment); >> } >> >> Thanks. >> >
-- 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/d/optout.
