[TYPO3-mvc] MM_opposite_field
Christian Baer
chr.baer at googlemail.com
Thu Jun 10 11:49:00 CEST 2010
Am 10.06.10 11:21, schrieb Christian Baer:
> Hi there,
>
> I have a problem in fetching data from a MM-Relation. From the "main
> side" there is no problem. In my repository I can use a query like this:
>
> [in Repository from table1:]
> $query->equals('table2.field_x', $value );
>
>
> When I try to use this from the opposite side (in tca:
> 'MM_opposite_field' => 'table1'), there comes an error. I try this:
>
> [in Repository from table2:]
> $query->equals('table1.field_y', $value );
>
>
> So when I want to use such an attribute-selector from the opposite side,
> extbase doesn't know the field i.e. I run into this error:
>
> Fatal error: Call to a member function getParentKeyFieldName() on a
> non-object in
> .../typo3conf/ext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php
> on line 632
>
>
> In Forge it says that this issue is resolved, is it really?
> http://forge.typo3.org/issues/show/3947
>
> Any ideas? Is this still an open issue?
>
>
> Regards
> Chris
>
>
>
My tables have underscores, maybe this is a problem? How do I have to
write the table in the $query?
$query->equals("table_name.field", $value);
OR
$query->equals("tableName.field", $value);
Regards
Chris
More information about the TYPO3-project-typo3v4mvc
mailing list