[TYPO3-mvc] Custom queries with multivalued properties
Martin Lipp
martin.lipp at gmail.com
Tue Nov 22 19:09:50 CET 2011
Hi,
i have two models: User and Branch. A User has many Branches. I know
that i have to use $query->contains('branches', $branch) to find all
Users which have the given $branch. My question is how to access deeper
elements of an multivalued property in a custom repository query?
If the user had only one branch, i would to the following to find all
users whose branch-title matches $searchText:
$query->like('branch.title', '%'.$searchText.'%')
How to i do this, when the user has many branches and I want to find
out, if any of the users branch-titles match my searchText? Is this not
possible, without writing custom SQL queries?
Thank you.
More information about the TYPO3-project-typo3v4mvc
mailing list