Skip to content

Commit

Permalink
Model::_findFirst() returns an empty array when no rows are found.
Browse files Browse the repository at this point in the history
  • Loading branch information
bar authored and rchavik committed Nov 5, 2012
1 parent e9e5a1e commit 3f1a8ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions en/appendices/2-2-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ I18N extract shell
Models
======

- ``Model::_findCount()`` will now call the custom find methods with
- ``Model::find('count')`` will now call the custom find methods with
``$state = 'before'`` and ``$queryData['operation'] = 'count'``.
In many cases custom finds already return correct counts for pagination,
but ``'operation'`` key allows more flexibility to build other queries,
or drop joins which are required for the custom finder itself.
As the pagination of custom find methods never worked quite well it required
workarounds for this in the model level, which are now no longer needed
workarounds for this in the model level, which are now no longer needed.
- ``Model::find('first')`` will now return an empty array when no records are found.

Datasources
===========
Expand Down
5 changes: 3 additions & 2 deletions en/appendices/2-3-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ Model
- Support for ``FULLTEXT`` indexes was added for the MySQL driver.


Model
-----
Models
------

- ``Model::find('list')`` now sets the ``recursive`` based on the max
containment depth or recursive value. When list is used with
ContainableBehavior.
- ``Model::find('first')`` will now return an empty array when no records are found.

Validation
----------
Expand Down

0 comments on commit 3f1a8ab

Please sign in to comment.