Quick search:


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 filters 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 default implementation  is to let the classDescriptor build a filter for each persistent field property that is not an id, augmented by the same for each derived 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 pnt.db.PntDbClassDescriptor::getAllFieldsFilter on the classDescriptor.