Feature #2603
Implement magic findBy*() and findOneBy*() methods in the base repository
Status: | Resolved | Start date: | 2009-02-10 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 0% |
|
Category: | Persistence | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 1 | |||
PHP Version: | Complexity: | |||
Has patch: |
Description
The base Repository should provide some magic __call() method taking care of findBy*() and findOneBy*() method calls, returning the results of searches for a property called after the method:
$result1 = $repository->findByFoo('bar'); $result2 = $repository->findOneByFoo('bar');
$result1 will contain an array of all objects whose property 'foo' is 'bar'.
$result2 will contain the first object which matches a search for 'foo' == 'bar'.
Related issues
Associated revisions
History
#1 Updated by Robert Lemke over 6 years ago
- Status changed from Accepted to Resolved
Applied in changeset r1890.