Hello Bert aka Ralf :-)

I just now realise that this is actually a bug that's already fixed
for jOOQ 1.6.8!

http://sourceforge.net/apps/trac/jooq/ticket/847

#880 is in fact a duplicate. With jOOQ 1.6.8 (which I'll release this
weekend), Query.getSQL() should work correctly again.

Cheers
Lukas

2011/10/21 bert <[email protected]>:
> 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