[TYPO3-mvc] MM_opposite_field
Jochen Rau
jochen.rau at typoplanet.de
Thu Jun 10 12:05:21 CEST 2010
Hi Christian.
On 2010-06-10, Christian Baer <chr.baer at googlemail.com> wrote:
> 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);
Don't think in tables and fields, but think in objects and properties. The query object has no clue about the concept of databases and tables.
If you are in the repository responsible for Tx_MyExt_Domain_Model_MyObject then you have to write
$query->equals("propertyName", $value);
The dot might be a little bit confusing here as it is used in SQL to prefix field names with the table name.
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list