[TYPO3-mvc] Extbase complex query - using joins

Christian Mattart christian.mattart.newsgroups at gmail.com
Thu Feb 21 12:25:50 CET 2013


Thanks, that worked!

The key is to use the same camel-case as the corresponding object
parameters.

Regards,
Christian


2013/2/21 Patrick Schriner <patrick.schriner at diemedialen.de>

> Try:
>
> $query->equals('**participations.department.**groupName', $groupName)
>
> Regards,
> Patrick
>
>
> On Thu, 21 Feb 2013 10:22:07 +0100, Christian Mattart <
> christian.mattart.newsgroups@**gmail.com<christian.mattart.newsgroups at gmail.com>>
> wrote:
>
>  Hi,
>>
>> I am trying to write a query in order to fetch people who belong to a
>> specific group.
>>
>> I have 4 objects:
>> - Person
>> - Participation
>> - Department
>> - Group
>>
>> A Person can have as many Participations as he wants.
>> Each Participation is related to one Department. And every Department is
>> part of a Group.
>>
>> I have tried the following query:
>>
>>   $query = $this->createQuery();
>>   $query->matching(
>>     $query->equals('**participations.department.**group_name',
>> $groupName)
>>     );
>>
>>   $result = $query->execute();
>>
>> But it fails miserably with the following:
>> PHP Fatal error:  Call to a member function getParentKeyFieldName() on a
>> non-object in /home/lesscouts/domains/
>> test.lesscouts.be/typo3_src-4.**7.5/typo3/sysext/extbase/**
>> Classes/Persistence/Storage/**Typo3DbBackend.php<http://test.lesscouts.be/typo3_src-4.7.5/typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php>
>> on
>> line 679
>>
>> Do you know how to solve this?
>>
>> Thanks for your help!
>>
>
>
> --
> Patrick Schriner
>
> ______________________________**_________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>


More information about the TYPO3-project-typo3v4mvc mailing list