[TYPO3-mvc] mm-relation

Dawid Pacholczyk dpacholczyk at gmail.com
Mon Jan 17 12:34:36 CET 2011


W dniu 2011-01-17 12:25, Franz Koch pisze:
> Hey Dawid,
>
>> 'config' => array(
>> 'type' => 'inline',
>> 'foreign_table' => 'tx_myext_domain_model_portal',
>> 'MM' => 'tx_myext_record_portal_mm',
>> 'maxitems' => 99999,
>> 'appearance' => array(
>> 'collapse' => 0,
>> 'newRecordLinkPosition' => 'bottom',
>> 'showSynchronizationLink' => 1,
>> 'showPossibleLocalizationRecords' => 1,
>> 'showAllLocalizationLink' => 1
>> ),
> ...
>> Should I have some mm definition in Portal tca too ? Cause I don`t see
>> it there.
>
> if you're Portal model as a "records" property and you like to edit the
> relation from both sides, then yes. But you have to configure the
> foreign side as MM_opposite_field. Please have a look at the TCA docs on
> how to do it and what it's for.
>
> But just for testing - what happens if you change the TCA type from
> 'inline' to 'select' - do you see any records then?
>
> What happens if you add a @lazy annotation to your Portals property of
> the Record model? Maybe you're running in a endless recursion?
>

When I changed to inline in tca I see related portals to my record. So 
this works fine.

I`ve added @lazy to property

/**
	 * portal
	 * @lazy
	 * @var Tx_Extbase_Persistence_ObjectStorage<Tx_MyExt_Domain_Model_Portal>
	 */
	protected $portal;

Nothing changed :(



More information about the TYPO3-project-typo3v4mvc mailing list