Hi William,

Your use-case is indeed a very common one. In essence, you should read
up on this section of the jOOQ manual to learn about runtime schema
and table mapping:
http://www.jooq.org/doc/2.6/manual/sql-building/factory/runtime-schema-mapping/

Cheers
Lukas

2012/12/26  <[email protected]>:
> Hi,
>
> I'd like to know if this case has already been discussed : using multiple
> dialects with the same generated classes
>
> Let's imagine a multitenant application, with 1 database per tenant.
> Would it be possible to say "this tenant uses MySQL, this one uses
> SQLServer" using the very same generated classes ?
>
> Because I generated the classes both from MySQL then from SQLServer. They
> are, of course, different due to the schema name of sql server (every
> tablename begins with dbo).
> Due to that, just specifying the SQLDialect as parameter in the Factory is
> not enough to make things work for the SQLServer generated classes and the
> MySQL dialect, and vice versa.
> The SQLDialect makes the query syntax correct, this is actually just a
> problem of namespace.
>
> What solution do I have to make my case working ?
>
> Thank you guys :)

Reply via email to