Hello

I am a new user of Jooq - a not yet very comfortable with Java - so sorry 
if the answer is in a tutorial or in the documentation, but I can't find 
it...

I have a classic request :

 List<Foo> foos = 
context.select(...).from(...).where(...).and(...).and(...).fetchInto(Foo.class);

it works fine.


I want to add an orderBy only if necessary, so I tried something like :

SelectConditionStep query = 
context.select(...).from(...).where(...).and(...).and(...);

if (...) { 
   foos = query.orderBy(Table.Column.sort(dir)).fetchInto(Foo.class)
}

But I have warning : " unchecked call to orderBy(org.jooq.SortField<?>...) 
as a member of the raw type org.jooq.SelectOrderByStep

Should I use @java.lang.suppressWarnings({ "unchecked" }), or is there a 
better way to achieve this ? 


--
Julien Gilles.

-- 
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/groups/opt_out.


Reply via email to