|
What is query by example |
specifies a query by filling out a form, like the advanced search in SearchPages |
In the SearchPage the user can select search option (usually an attrubute or path) from a dropdown list, select a comparator and enter one or two search values. When the form is submitted it is to build a that specifies the search criteria and generate SQL for selecting objects from the database.
The list of search options can be defined in the static getFilters method on the class of peanuts to be retrieved. The is to let the build a filter for each that is not an id, augmented by the same for each single value property whose type is persistent.
The simple search combines all string typed filters from the advanced search through OR selecting LIKE - to find whatever peanuts related to the search pattern. Such a combined filter can be retrieved by calling on the classDescriptor.
|
|