Retrieving underlying table/view/entity from field #15914
-
Hello, Consider the same query as in the discussion post I made earlier today:
I'd like to find out what table/view the field "a.id" belongs to. Is there a way to do so? I see that there is a TableField/TableFieldImpl that does have a way of retrieving the table. But that is only meant for generated code. I tried retrieving the associated metadata via context.meta() but apparently there is no way of retrieving columns directly for a table? Any ideas would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could use identifiers instead of plain SQL templates: Of course, using the code generator is even better for hundreds of reasons: But you probably have a dynamic schema preventing you from using it? |
Beta Was this translation helpful? Give feedback.
You could use identifiers instead of plain SQL templates:
https://www.jooq.org/doc/latest/manual/sql-building/names/
Of course, using the code generator is even better for hundreds of reasons:
https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/
But you probably have a dynamic schema preventing you from using it?