[TYPO3-mvc] Update relations to inline objects

Dirk Rauscher dr_typo3 at itb-institut.de
Mon Mar 5 17:09:06 CET 2012


Hi Jochen

I'choosen the third of your suggestions and remove the old object before 
adding a new one.

Thanks for that

Kind regards,
Dirk


Am 02.03.2012 15:22, schrieb Jochen Rau:
> Hi Dirk,
>
> On 2012-03-02, Dirk Rauscher<dr_typo3 at itb-institut.de>  wrote:
>> my 'patient' object has a property 'protocol'. In TCA the 'protocol' is
>> implemented as inline relation and only 1 protocol per patient is allowed.
>>
>> When adding a protocol to a patient in the backend this rule is complied.
>>
>> But when I call the setProtocol($protocol) method of the patient object
>> with a new protocol object, the relation to the previous protocol is kept.
>
> Extbase does not interpret the TCA validation rules (by purpose). You might want to either
> - add a validation rule to your property in the model,
> - change your relation type to 1:1 (which it actually is),
> - or remove the old object bevor adding a new one.
>
>> I've set config.tx_extbase.persistence.updateReferenceIndex = 1 but it
>> has no effect on this issue.
>
> TYPO3 uses the reference index internally to show related records. It's shown in the
> list view as number of relations. Extbase updates the index but does nothing with it.
>
> Best
> Jochen
>
>



More information about the TYPO3-project-typo3v4mvc mailing list