Hello, Indeed, the AS_IS matcher transformation type is intended to produce setters like setLAST_NAME from columns like LAST_NAME. The idea is that case-sensitive searches across a code base will match.
Currently, your best option is to use programmatic strategies as documented here: http://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy I wouldn't patch jOOQ's MatcherStrategy, unless you already wrote lots and lots of XML that you prefer not to migrate anymore... Hope this helps, Lukas 2016-07-14 12:13 GMT+02:00 Goddamned Qu <[email protected]>: > hi > > with the camel-named schema : > > CREATE TABLE `Author` ( > `id` int NOT NULL, > `firstName` varchar(255) DEFAULT NULL, > `lastName` varchar(255) DEFAULT NULL, > PRIMARY KEY (`id`) > ); > > the generated POJO would be like this: > > public class Author { > private Integer id; > private String firstname; > private String lastname; > > public String getFirstname() { > return this.firstname; > } > public Author setFirstname(String firstname) { > this.firstname = firstname; > return this; > } > // omit some code ... > } > > how could I make the POJO camel-named as well > > ps. I tried with > http://www.jooq.org/doc/3.8/manual-single-page/#codegen-matcherstrategy > with config like this: > > <strategy> > <matchers> > <fields> > <field> > <expression>^(.)(.+)$</expression> > <fieldMember> > <transform>AS_IS</transform> > <expression>$0</expression> > </fieldMember> > <fieldSetter> > <transform>AS_IS</transform> > <expression>set$0</expression> > </fieldSetter> > <fieldGetter> > <transform>AS_IS</transform> > <expression>get$0</expression> > </fieldGetter> > </field> > </fields> > </matchers> > </strategy> > > > but got setters like this `setfirstName` > > Is there a way to do this besides modify MatcherStrategy.java like this > > private final String transform(String string, MatcherTransformType > transform) { > if (transform == null) > return string; > > switch (transform) { > case AS_IS: > return string; > ... > case CAPITALIZE: > return StringUtils.Capitalize(string); > > > Am I missing sth.? 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. > -- 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.
