Isomorphic,
I would like to know if there is a utility method in the api's to construct a whereClause from the criteria I provide. We use some sub-queries etc in our ds.xml file. So we end up having two whereClauses, especially when UNION is used. Anything that would just take criteria or advancedCriteria object and create the appropriate where clause irrespective of the datasource or operationBinding. I know its a bit of ridiculous question to ask considering that criteria has no way of knowing the fieldname type etc. but just trying out my luck. :)
I cannot use the SQLDataSource.getClause as this method actually constructs the clause based on the ds.xml file.
My idea is in case of UNION to push one query whereClause with $defaultWhereClause and another with $defaultWhereClause2 constructed manually and put using addToTemplateContext. So utility method will help me in the $defaultWhereClause2 construction.
Thanks.
I would like to know if there is a utility method in the api's to construct a whereClause from the criteria I provide. We use some sub-queries etc in our ds.xml file. So we end up having two whereClauses, especially when UNION is used. Anything that would just take criteria or advancedCriteria object and create the appropriate where clause irrespective of the datasource or operationBinding. I know its a bit of ridiculous question to ask considering that criteria has no way of knowing the fieldname type etc. but just trying out my luck. :)
I cannot use the SQLDataSource.getClause as this method actually constructs the clause based on the ds.xml file.
My idea is in case of UNION to push one query whereClause with $defaultWhereClause and another with $defaultWhereClause2 constructed manually and put using addToTemplateContext. So utility method will help me in the $defaultWhereClause2 construction.
Thanks.
Comment