[TYPO3-mvc] Blog Example and Value Object question

Martin Kutschker masi-no at spam-typo3.org
Wed Dec 30 18:53:00 CET 2009


Jochen Rau schrieb:
> Hi.
> 
> schrieb Franz Koch:
> [...]
>> So maybe a more generic method like "findAllByBlogAndMultipleProperties"
>> might be the way to go, although writing tests for this might be a bit
>> more difficult than for "simpler" methods.
>>
>> $postRepository->findAllByBlogAndMultipleProperties(
>> $blog,
>> array (
>> 'author' => $author,
>> 'tag' => $date,
>> 'timerange' => array(
>> 'min' => $dateMin,
>> 'max' => $dateMax
>> )
>> ));
>>
>> What do you think? If you think this would be a good idea, we should
>> think of a proper method name and provide a generic
>> "findByMultipleProperties" in the abstractRepository of extbase as a)
>> usefull addition and b) as a reference for other methods of this type.
> 
> 
> What about findByCriteria(Tx_MyExtension_Domain_Model_Criteria
> $criteria) if that suits the Domain?

Sounds good.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list