2017-04-03 14:39 GMT+01:00 Durim Kryeziu <[email protected]>: > Yeah, you're right, doesn't make sense to generate code on runtime, how I > missed it :( >
No worries ;) > But is there any simple way to generate code just when I want > programmatically ? > Of course. You could put that code in a main(String[] args) method and call that from anywhere, e.g. the console. Or you could call it from ant or from the ant-maven plugin: https://www.jooq.org/doc/latest/manual/code-generation/codegen-ant > Does it work to do something like this ? .withSchemaVersionProvider("1") > ? and to save that value to a env var and change from time to time ? > Yes the schema version provider is the tool to prevent re-generation for the same schema version. An environment variable would work, but it would be tedious. But if you run the code generator programmatically (and explicitly, e.g. through some ant call), why would you need the schema version provider? You would only manually re-generate the code when needed, right? -- 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.
