Hi Tom,
I'm sure Lukas will reply himself, but I did this when we started with Jooq
... the solution was to run multiple generate steps in our build, each
having their own configuration.
Aram
On Monday, March 19, 2018 at 2:13:44 AM UTC-4, Tom Dunstan wrote:
>
> Hi all
>
> Currently our codegen setup (using the gradle plugin) looks roughly like
> this:
>
> generator {
> name = 'org.jooq.util.DefaultGenerator'
> database {
> name = 'org.jooq.util.postgres.PostgresDatabase'
> inputSchema = 'public'
> forcedTypes {
>
> // etc
>
> }
> generate {
>
> // etc
> }
> target {
> packageName = 'com.foo.jooq'
> directory = 'src/generated/jooq'
> }
> }
> }
>
> I would like to also map a few tables from pg_catalog that aren't included in
> the default jooq-meta package, while leaving the generated classes for the
> existing public schema in the same java package that they are currently
> generated in.
>
> My initial attempt to do this looks is basically replacing the inputSchema
> above with this:
>
> schemata {
> schema {
> inputSchema = 'public'
> outputSchemaToDefault = true
> }
> schema {
> inputSchema = 'pg_catalog'
> }
> }
>
>
> This results in the tables that are currently under com.foo.jooq ending
> up under com.foo.jooq.default_schema. If I leave outputSchemaToDefault
> out, they end up in com.foo.jooq.public_. I've tried various combinations
> of setting outputSchema to '' or null, and combinations of leaving the
> original inputSchema in place etc. I can't get it to leave the existing
> mapped tables in the package that they're currently in when more than one
> input schema is used.
>
> Is what I'm trying to do possible, or do I just have to deal with the
> package change?
>
> Thanks
>
> Tom
>
>
--
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.