Page 1 of 1

QueryBuilder:How to refine the existing query

PostPosted: Sat Apr 06, 2013 7:13 am
by lsjiang
Hi,
I have a foundset which needs to be filtered. I used to use foundset.find() and foundset.search(false,true) to get a subset of the current foundset. Now I'm using QueryBuilder. I'm not clear that query.where.add(query.columns.aCoulumnName.eq(...)) will extend the query or refine the query? If it extends the query then how to refine it?

Thanks,

Re: QueryBuilder:How to refine the existing query

PostPosted: Thu Apr 11, 2013 1:24 pm
by lopamudram
Hello lsjiang

The query from Query Builder will not extend the query result from a find and search operation. But if you are doing find and search after filtering with query builder it will extend the query from Query Builder if reduced search parameter is set to true (foundset.search(false,true)). You can check it by comparing query result for foundset after each operation using "databaseManager.getSQL(foundset)".

Hope this helps.

Regards
Lopamudra
http://www.mindfiresolutions.com/