[TYPO3-mvc] $query->contains('feUser.usergroup', $myGroup) creates incorrect SQL syntax

Marc Bastian Heinrichs typo3 at mbh-web.de
Mon Jan 23 11:07:51 CET 2012


Hi Dominic,

Am 20.01.12 01:49, schrieb Domi:
> On 01/19/2012 05:42 PM, Marc Bastian Heinrichs wrote:

>>> [...]
>>>
>>> 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?


> 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,
> );

Extbase has no native support for the TCA type "group" yet. You can use
group fields of internal_type 'db' and a relation to a single table
though, but you need to additionally define 'foreing_table'
=> 'nameOfTable' in your TCA in order to make it work.

Better you use TCA type select like it's defined in fe_user.
$TCA['fe_users']['columns']['usergroup']['config'] ...

Best
Marc Bastian


More information about the TYPO3-project-typo3v4mvc mailing list