Query objects - creation and usageEdit on GitHub
Query objects provide an object-oriented API for writing database queries which are used in query containers.
Please check the official Propel Query Reference for a complete documentation.
Creating a New Query Object
Query objects are created by Propel during the
build model step. See the schema definition for details how to describe them in XML.
As you can see
src/Orm/Zed/ the query object which belongs to the Spryker core extend base classes placed in the vendordirectory. This way you can easily adopt the classes for your needs but we can still add methods in the core.
Query Class Qenerator
Propel module alters the rules of generating query models by requiring explicit passing of filtering criteria into
This means, that when an array,
LIKE expression or an array with
min/max are passed as a filtering argument, it is explicitly required to specify
Criteria::BETWEEN is implemented in the wrapper class
Propel module adds the following methods into the generated classes, that allow to easily filter:
For submitting the form