Generate table classes with Table as suffix or similar?

11 views
Skip to first unread message

BTJ

unread,
Sep 14, 2016, 7:29:03 AM9/14/16
to jOOQ User Group
Is there any way to make generating tables choose other name than the database table name? I.e. I have POJOs using the same names, which can get confusing...


Regards,

BTJ

Lukas Eder

unread,
Sep 14, 2016, 8:19:05 AM9/14/16
to jooq...@googlegroups.com
Sure, please refer to the following sections of the manual explaining how generator strategies work:


--
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.

BTJ

unread,
Sep 14, 2016, 8:41:27 AM9/14/16
to jOOQ User Group
Aaah, I scanned that page but I missed it.. But I see there is even an example there.... Thx... :)

BTJ


On Wednesday, September 14, 2016 at 2:19:05 PM UTC+2, Lukas Eder wrote:
Sure, please refer to the following sections of the manual explaining how generator strategies work:

2016-09-14 13:29 GMT+02:00 BTJ <bt.jo...@gmail.com>:
Is there any way to make generating tables choose other name than the database table name? I.e. I have POJOs using the same names, which can get confusing...


Regards,

BTJ

--
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+...@googlegroups.com.

Janne Hyötylä

unread,
Sep 15, 2016, 4:30:16 AM9/15/16
to jOOQ User Group
We recently did exactly this. If somebody is interested in a "copy-paste-solution":

<generator>
    <strategy>
        <matchers>
            <tables>
                <table>
                    <tableClass>
                        <transform>PASCAL</transform>
                        <expression>$0_TABLE</expression>
                    </tableClass>
                </table>
            </tables>
        </matchers>
    </strategy>
</generator>

Cheers
Janne
Reply all
Reply to author
Forward
0 new messages