Hi Lukas,
in your latest blog post you states regarding those Step types: 
"You should never reference these types directly, nor see them in your own 
code. They are intermediate DSL artifacts"

I usually create my dynamic queries with those types, e.g.

SelectConditionStep<Record> statement = 
jooq.select(ATTEST.fields()).from(ATTEST).where(buildFilterCondition(filter));
...
SelectSeekStep1<Record, ?> orderStep = null;
if (sortOrders == null || sortOrders.size() == 0) {
    // default sort order: ID
    orderStep = statement.orderBy(ATTEST.ID);
} else {
    // specialized order
    ...
}
return orderStep.limit(limit)
            .offset(offset)
            .fetchInto(Attest.class);

In order to avoid those intermediate DSL artifacts, I try to use QueryParts 
and their derived classes like org.jooq.Select

But that didn't work, the copmpiler complains:

Select<Record> statement = 
jooq.select(ATTEST.fields()).from(ATTEST).where(buildFilterCondition(filter));
together with 
var orderStep = statement.orderBy(ATTEST.ID);
leads to
The method orderBy(TableField<AttestRecord,Integer>) is undefined for the 
type Select<Record>

But changing the return type of Select<Record> statement into the 
specialized Select<AttestRecord>
leads to 
Type mismatch: cannot convert from SelectConditionStep<Record> to 
Select<AttestRecord>

How can I solve this problem in order to prevent the usage of those 
interdemiate step types ?

Kind regards
Dominik

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/41dc9eb5-163b-4abf-a17e-7c7be669bfd0n%40googlegroups.com.

Reply via email to