Hello Ian,

Take a look:
http://www.jooq.org/doc/2.5/manual/sql-building/factory/runtime-schema-mapping/

here is example:

        Factory factory = new Factory(
                transactionAwareDataSource(),
                SQLDialect.ORACLE,
                new Settings()
                        .withRenderMapping(new RenderMapping()
                                .withSchemata(new MappedSchema()
                                        .withInput("PROJ")
                                        .withOutput("PROJ_PROD")))
        );

where "PROJ" - is staging schema name (this name is used in generated code).
"PROJ_PROD" - production schema

--

On Wed, Sep 12, 2012 at 7:32 PM, Ian Clarke <[email protected]> wrote:

> I asked this before I think but Jooq has had a few releases since then.
>
> How do I force Jooq to use a particular database schema (I'm using MySql),
> regardless of which schema was used to generate the sources?
>
> With our current setup, we generate sources from a staging or production
> schema, depending on whether it's our staging platform or our production
> code.
>
> But in one particular instance, I want my code to use the staging schema
> regardless of whether the sources were generated from our staging or
> production schema.
>
> Is this possible?
>
> Thanks,
>
> Ian.
>
> --
> Ian Clarke
> Blog: http://blog.locut.us/
>
>

Reply via email to