Guten Tag Lukas Eder,
am Samstag, 6. Juni 2020 um 10:28 schrieben Sie:
That option is enabled, explicitly disabling it results in different
results of the generator breaking things additionally.
> [...]Otherwise, what's the type of your RdQueryBuilder.CTE_NAME_RE_IDS?
It's really only a name:
> private static final Name CTE_NAME_RE_IDS = DSL.name("real_estate_ids");
The corresponding column, indentation is by me:
> public final TableField<RealEstateRecord, IntegerID = createField
> (
> DSL.name("id"),
> org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue
> (
> org.jooq.impl.DSL.field
> (
> "nextval('real_estate_id_seq'::regclass)",
> org.jooq.impl.SQLDataType.INTEGER
> )
> ),
> this,
> ""
> );
The overloads in "Field":
> Condition in(Collection<?> values);
> Condition in(Result<? extends Record1<T>> result);
> Condition in(T... values);
> Condition in(Field<?>... values);
> Condition in(Select<? extends Record1<T>> query);
The following works, but is obviously wrong:
> .where(
REAL_ESTATE.ID.in((Field<?>) DSL.selectFrom(RdQueryBuilder.CTE_NAME_RE_IDS))
Every other cast seems to fail with Java trying to use the overload
for "in(Collection)". I really only want an "in(SELECT * FROM ...)"
and other more verbose statements don't work as well:
> .where(
REAL_ESTATE.ID.in(DSL.select(DSL.asterisk()).from("").where(DSL.trueCondition()))
> .where(
REAL_ESTATE.ID.in(this.getDbConn().getJooq().select(DSL.asterisk()).from("").where(DSL.trueCondition()))
Isn't that pretty much what the official docs have as example as well?
https://www.jooq.org/doc/3.13/manual/sql-building/table-expressions/nested-selects/