But I'm currently not sure if opening up such API is a good idea - it's
hard to keep the internal QueryPart APIs backwards compatible. Also, an
aliased field is quite a different thing from the original field reference.
For one, it can alias anything, including expressions based on several
field references and other expressions, such as:
first_name || ' ' || last_name AS name
Of course, you can keep a reference to your unaliased field and fetch the
qualified name from that:
Thank you for your answer, I get it now why an alias sometimes shouldn't
have a reference to a table: even considering that some expression like
"'myvar' as myvar" is in context of some table, it is not really related to
the table by its nature.
I think I'll go with keeping a reference to the original field - it is
already kind of what I'm already doing.
Also it's nice to see that a lot of cases already have corresponding issues
on GitHub :)
On Monday, November 20, 2017 at 1:31:00 PM UTC+2, Lukas Eder wrote:
> Also it's nice to see that a lot of cases already have corresponding
> issues on GitHub :)
Oh yeah - jOOQ has been around for a while, and so have been the various
ideas to enhance it. The question is just: Is there a more generic new
feature that would allow for solving dozens of issues at once, rather than
solving them individually :)
> My schema is dynamic, so I don't have any table-to-class mappings. And
> it's not possible to set such forcedType in a DSL config, is it?
Unfortunately, right now, it isn't - at least not for your particular
"plain SQL" / "direct JDBC" usage. The pending feature request is here,
I've increased its priority for jOOQ 3.11: https://github.com/jOOQ/jOOQ/issues/4473
If you're willing to patch your jOOQ version, you will be able to implement
the feature directly in org.jooq.impl.MetaDataFieldProvider, which creates
Field<?> and DataType<?> references from JDBC's java.sql.ResultSetMetaData
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].