[TYPO3-mvc] Problem with extbase-ext on joint tables with same field-names?
Joerg Schoppet
joerg at schoppet.de
Tue May 26 20:43:03 CEST 2009
Ok,
so after I commented out all places, where I use 1:1 relationships it is
working.
Can someone explain, what I've done wrong?
Or how I can better debug the faulty places?
Joerg
Joerg Schoppet schrieb:
> OK,
>
> so one more thing. As it seems, there is only a problem with
> "Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_ONE"
>
> I forgot to include this in my layout-description:
>
> I additionally have an "information" table, which holds a 1:1 relation
> to products.
>
> In products in achieved that with the following TCA-structure:
> 'information' => array(
> 'exclude' => 1,
> 'label' =>
> 'LLL:EXT:extkey/Resources/Private/Language/locallang_db.xml:tx_extkey_domain_model_information',
>
> 'config' => array(
> 'type' => 'inline',
> 'foreign_class' =>
> 'Tx_WineTreatment_Domain_Model_Information',
> 'foreign_table' =>
> 'tx_winetreatment_domain_model_information',
> 'foreign_field' => 'product',
> 'size' => 1,
> 'maxitems' => 1,
> ),
> ),
>
> and in "information" I have the following TCA:
> 'product' => array(
> 'config' => array(
> 'type' => 'passthrough',
> ),
> ),
>
>
> Please, don't ask me why I've splitted this up. But is this really not
> possible, or is this a bug, or have I done something wrong??
>
>
> Joerg
>
>
>
> Joerg Schoppet schrieb:
>> Hi,
>>
>> I try to build a rather complex application with extbase, which
>> primary has the following layout:
>>
>> Category (field: name, products)
>> Products (field: name, category, description, sizes)
>> Sizes (field: name, icon)
>>
>> Category to Products is a 1:n relationship.
>> Products and Sizes are n:m relationship realized with a mm-table.
>>
>>
>> If I now try to view all available Categories in the FE I get the error
>> Fatal error: Cannot pass parameter 3 by reference in
>> [path]/extbase/Classes/Persistence/Mapper/ObjectRelationalMapper.php
>> on line 409
>>
>> Even if I try to modify the function "reconstituteObjects()" I only
>> get other errors. :-(
>>
>> Doing a var_dump on ($row) within this function I realize, that all
>> fields are all the tables are within one array, so name of category is
>> replaced by name of product is replaced by name of size.
>>
>> Can this be?
>>
>> Before I renaming all the database-fields, I just want to be sure,
>> that this is the case.
>>
>> Thanks
>>
>> Joerg
More information about the TYPO3-project-typo3v4mvc
mailing list