Hi, I’m using Jooq with model mapper and guice in a quite big application. I’using model Jooq 3.1.0, mapper 0.6.1 and guice 3.0.
I followed instructions I find here<http://blog.jooq.org/2013/08/06/use-modelmapper-and-jooq-to-regain-control-of-your-domain-model/> but the following test fails: class MiaClasse { private String asd; //used to force custome property mapping private String email; //get and set here …. } @Test public void jooqRecordModelMapperTest() throws Exception { Result<Record2> res = JooqUtil.getDSLContext(db.getConnection()) .select(ACCOUNT_USER.PASSWORD_HASH, ACCOUNT_USER.EMAIL) .from(ACCOUNT_USER) .fetch(); ModelMapper mp = new ModelMapper(); mp.getConfiguration().addValueReader(new RecordValueReader()); mp.getConfiguration().setSourceNameTokenizer(NameTokenizers.UNDERSCORE); mp.getConfiguration().setProvider(GuiceIntegration.fromGuice(injector)); mp.addMappings(new PropertyMap() { @Override protected void configure() { map(source(“password_hash”)).setAsd(null); } }); for (Record2 r : res) { MiaClasse c = mp.map(r, MiaClasse.class); assertThat(c.getAsd(), is(r.value1())); assertThat(c.getEmail(), is(r.value2())); } } to get it pass i need to use a PropertyMap instead of PropertyMap. But in Jooq 3.1.0 RecordImpl class is a package protected, so I need to “patch” it including this one in my source code tree and set the public visibility. Can you make this class public? -- 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.
