Add custom annotation to generated pojos

301 views
Skip to first unread message

Fedor

unread,
Oct 26, 2016, 2:33:01 PM10/26/16
to jOOQ User Group
Hi, Lucas! Thanks for awesome tool! 
Currently i use liquibase, hibernate, hibernate reverse engineering tool for workflow. After creating changeset in liquibase i run reverse tools, than do manual mapping from these pojos to domain objects, which is written manually. Basicaly, all of this can be replaced with jooq since i generate database schema first. One issue is that for my domain objects i'am using lombok project for all getter, setter, constructor, to string, etc stuff. This gives really "clear" domain objects that nice for use. 
Is it possible to tell jooq codegen to add custom annotation to generated classes and not generate getter, setter but to use lombok for that? Thanks. 

Lukas Eder

unread,
Oct 26, 2016, 4:45:46 PM10/26/16
to jooq...@googlegroups.com
Hi Fedor,

Thank you very much for your feedback. I'm glad to hear that you've found a good replacement for Hibernate in your project.

jOOQ's code generator doesn't allow you to easily override it at such a level. I suspect the easiest way forward would be to simple override JavaGenerator.generatePojo(TableDefinition, JavaWriter) and roll your own from scratch.

I hope this helps,
Lukas

--
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 jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages