Thanks for the reply Sergey, but what if I don't know the schema name used in the generated code? In our setup this varies depending on whether we're deploying to staging or production.
Ian. On Wednesday, September 12, 2012 12:10:18 PM UTC-5, Sergey Epik wrote: > > 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 <ian.c...@gmail.com<javascript:> > > 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/ >> >> >