[TYPO3-mvc] $query->contains('feUser.usergroup', $myGroup) creates incorrect SQL syntax
Domi
djgarms at gmail.com
Fri Jan 20 01:49:19 CET 2012
On 01/19/2012 05:42 PM, Marc Bastian Heinrichs wrote:
> Hey Dominic,
>
>> in my repository I have a entity with a 1:1 relation to fe_users and
>> want to filter all of the entities where its user is in a certain group.
>> But the query
>>
>> $query = $this->createQuery();
>> $constraint = $query->contains('feUser.usergroup', $group);
>> $query->matching($constraint);
>> return $query->execute();
>>
>> Results in a incorrect syntax: in the join and in the column names the
>> table fe_users is missing. Here the sql error:
>>
>> [...]
>>
>> So the table fe_users is missing in the JOIN and in the WHERE clause. If
>> I add it manually in a sql browser its valid and working.
>>
>> Is this a bug or is it not possible in the way I do it?
>
> Could you post your tca and your model properties? And which version do
> you use?
>
>
> Best
> Marc Bastian
Hi
this is how my TCA looks like:
$TCA['tx_myext_domain_model_client']['columns']['fe_user']['config'] =
array(
'type' => 'group',
'allowed' => 'fe_users',
'internal_type' => 'db',
'maxitems' => 1,
'minitems' => 1,
'wizards' => $editSuggestWizard,
);
The model:
/**
* feUser
*
* @var Tx_Myext_Domain_Model_FEUser
*/
protected $feUser;
I am using TYPO3 4.6.3. Hope you can see my mistake
Thanks
Dominic
More information about the TYPO3-project-typo3v4mvc
mailing list