Running a Query
How to execute a custom query you created with the query builder.
Executing queries
Any query can be executed by calling the executeQuery
method on a repository. The return value will depend on the type of query - a select query will return one or more entities, but insert, update, and delete queries will return the number of database records that were affected by the query.
Queries with find methods
In addition to executeQuery
, you can pass a select query to any of the find methods on a repository (instead of an array of criteria). This allows you to do things like call findValuesBy
and get an indexed array back instead of entities.
Or get an associative array:
Last updated