I would like to launch simple code:

SelectQuery query = dsl.select(field ("id"), 
field("title")).from("dict.models").getQuery();

if (companyId > 0) query.addConditions(field("company_id").equal(companyId));
if (modelId > 0) query.addConditions(field("model_id", 
SQLDataType.INTEGER).equal(modelId));



But unfortunately, in query.getSQL() I can see only:

select id, title from dict.models where (company_id = ? and model_id = ?)

Values for model_id and company_id are 5 and 10 (possible to see in debugger)


Please, help me, where I was wrong.

Thank you.

-- 
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/d/optout.

Reply via email to