Re-generate jOOQ code

28 views
Skip to first unread message

lisa andrews markitks

unread,
May 15, 2019, 7:27:21 PM5/15/19
to jOOQ User Group

My project Spring boot + jooq is practically ready, the problem is that a new table was inserted into the database mapped by jooq, logically this new table does not appear in jooq.tables how do I generate the classes for this new table?
thanks

Lukas Eder

unread,
May 16, 2019, 2:58:06 AM5/16/19
to jooq...@googlegroups.com
Hi Lisa,

Thank you very much for your message. This will depend on how you have set up your project. Per se, jOOQ doesn't know that you have a new table in your schema, but ideally, you would integrate migration of your schema into your build pipeline. We usually recomment combining jOOQ and Flyway:

This solves two problems:

1. jOOQ will be automatically aware of your schema changes and regenerate code for you
2. You have already properly managed your schema migrations, which will be very essential for your application, in the future

Of course, you could also configure the code generator to re-generate code manually. There are many options.

I hope this helps,
Lukas 

On Thu, May 16, 2019 at 1:27 AM lisa andrews markitks <lisaan...@gmail.com> wrote:

My project Spring boot + jooq is practically ready, the problem is that a new table was inserted into the database mapped by jooq, logically this new table does not appear in jooq.tables how do I generate the classes for this new table?
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/4f1fe57b-7ebb-48b3-a802-f99e3980e2ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lukas Eder

unread,
May 16, 2019, 6:22:40 AM5/16/19
to jOOQ User Group
For the record, your question was also asked on Stack Overflow:


On Thursday, May 16, 2019 at 8:58:06 AM UTC+2, Lukas Eder wrote:
Hi Lisa,

Thank you very much for your message. This will depend on how you have set up your project. Per se, jOOQ doesn't know that you have a new table in your schema, but ideally, you would integrate migration of your schema into your build pipeline. We usually recomment combining jOOQ and Flyway:

This solves two problems:

1. jOOQ will be automatically aware of your schema changes and regenerate code for you
2. You have already properly managed your schema migrations, which will be very essential for your application, in the future

Of course, you could also configure the code generator to re-generate code manually. There are many options.

I hope this helps,
Lukas 

On Thu, May 16, 2019 at 1:27 AM lisa andrews markitks <lisaan...@gmail.com> wrote:

My project Spring boot + jooq is practically ready, the problem is that a new table was inserted into the database mapped by jooq, logically this new table does not appear in jooq.tables how do I generate the classes for this new table?
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 jooq-user+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages