[TYPO3-mvc] Extbase-Problem with RELATION_HAS_ONE

Joerg Schoppet joerg at schoppet.de
Wed May 27 00:24:57 CEST 2009


Hi,

just see my post two up "Problem with extbase-ext on joint tables with 
same field-names?".

I decided to open a new post with the right subject, I think.

So,

I have the following structure:

tx_extexample_domain_model_product
- name varchar(200) NOT NULL default ''
- size int(11) NOT NULL default '0'

TCA:
'size' => array(
   'label' => 
'LLL:EXT:extexample/Resources/Private/Language/locallang_db.xml:tx_extexample_domain_model_size', 

   'config' => array(
     'type' => 'select',
     'foreign_class' => 'tx_ExtExample_Domain_Model_Size',
     'foreign_table' => 'tx_extexample_domain_model_size',
     'foreign_table_where' => 'ORDER BY 
tx_extexample_domain_model_size.name',
     'items' => array(
       array('', 0),
     ),
     'size' => 1,
     'minitems' => 0,
     'maxitems' => 1,
   ),
),

tx_extexample_domain_model_size
- name varchar(200) NOT NULL default ''

TCA:
standard, nothing special

If I try to open a view, I which I display all the products, I get the 
error:
Fatal error: Cannot pass parameter 3 by reference in 
[path]/extbase/Classes/Persistence/Mapper/ObjectRelationalMapper.php on 
line 409

This is in the part, where the if-condition evaluates to 
Tx_Extbase_Persistence_Mapper_ColumnMap:: RELATION_HAS_ONE


As soon as I include a 'MM' => tx_extexample_product_size_mm' entry 
(including also such a table ;-) ) it is working.

But, it is not needed, because only one entry can be selected.


What can I/we do?



Joerg


More information about the TYPO3-project-typo3v4mvc mailing list