Hello,
Indeed, only the unqualified column name is being rendered to the SQL
output, no matter what kind of Field expression you're putting there. There
must be some historic reason for this, related to a SQL dialect that
doesn't support qualification in the FOR UPDATE .. OF clause - or that has
only limited support for qualification. I'll need to investigate this, and
I've registered an issue:
https://github.com/jOOQ/jOOQ/issues/4151
What dialect are you using? Oracle?
As a workaround, you might be able to write:
DSLContext ctx = DSL.using(configuration);
...
.of(DSL.field(ctx.render(Tables.CLIENT.as("clients").NUM)),
DSL.field(ctx.render(Tables.CLIENT.as("clients").ID.toString())))
That would generate the SQL string first, before embedding it in the AST
Hope this helps,
Lukas
2015-03-22 17:24 GMT+01:00 Oleg <[email protected]>:
> Hi
>
> I have select like this in Jooq 3.5.0:
>
> ...
>
> .forUpdate()
> .of(Tables.CLIENT.as("clients").NUM., Tables.ACCOUNT.as("accounts").ID)
> .skipLocked()
> .fetch();
>
>
> The generated SQL will end with
>
>
> FOR UPDATE OF "NUM", "ID" SKIP LOCKED
>
>
> instead of
>
>
> FOR UPDATE OF "clients"."NUM", "accounts"."ID" SKIP LOCKED
>
>
>
> Is it possible to make JOOQ use table alias in the for update statement?
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.