ColdFusion 9.0 Resources |
ORMExecuteQuery(hql, params [,unique] [,queryOptions])DescriptionThis type of ORMExecuteQuery lets you pass parameters to the query. Use '?' (question mark) as the placeholder for the parameters. The values to the parameters must be passed as an array to params. In addition, you can specify several options to control the behavior of retrieval using queryOptions:
Note: Maxresults and timeout
are used for pagination.
CategoryExample<cfset employees = ORMExecuteQuery("from Employee where age > ?", [40])> <cfset employeeObj = ORMExecuteQuery("from Employee where EmployeeID=?", [1], true)> <cfset employees = ORMExecuteQuery("from Employee where age > ? and age < ?", [40, 80])> |