Hello Lukas,

Here my statement, maybe i am doing something basic the wrong way:

SchemaMapping mapping = new SchemaMapping();
mapping.add(Test.TEST, "PROD");

Factory berechtigung = new Factory(getConnection(), SQLDialect.ORACLE,
mapping);

Query query = berechtigung
          .select(Kunde.KURZBEZEICHNUNG)
          .from(Kunde.KUNDE)
          .where(Kunde.BEZEICHNUNG.equal("NAME1"));

System.out.println(query.getSQL());
//not working - console output:
//select TEST.KUNDE.KURZBEZEICHNUNG from TEST.KUNDE where
TEST.KUNDE.BEZEICHNUNG = ?

System.out.println(berechtigung.render(query));
//working - console output:
//select "PROD"."KUNDE"."KURZBEZEICHNUNG" from "PROD"."KUNDE" where
"PROD"."KUNDE"."BEZEICHNUNG" = ?

cheers

Bert aka Ralf ;-)


On 20 Okt., 18:37, Lukas Eder <[email protected]> wrote:
> Hello Bert,
>
> >> But here the schema mapping is not considered => is this the expected
> >> behaviour ?
>
> > That is not expected. Both SQLDialect and SchemaMapping should be
> > considered in this case. I'll further analyse this potential bug:
> >https://sourceforge.net/apps/trac/jooq/ticket/880
>
> I could not reproduce this issue. Query.getSQL() correctly renders
> mapped schemata in my integration tests. Maybe you can provide me with
> some code to reproduce the issue? How are you constructing your Query?
>
> Cheers
> Lukas

Reply via email to