[TYPO3-core] RFC: Bidirectioanl MM relations
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Sep 11 12:59:37 CEST 2006
Kasper Skårhøj schrieb:
>>
>>> Anyway, the more SERIOUS problem with sys_refindex is this: Say you
>>> edit
>>> pages:2 and remove the reference to pages:1. Now pages:1 only points to
>>> "pages:3". However, in sys_refindex there will still be a reference
>>> recorded to both pages:2 and pages:3 because when saving pages:2 the
>>> API
>>> call is only made for pages:2 - but it should also be made for any
>>> added
>>> or removed reference!
>>
>> Yes, this would become a problem if you'd put each relation into
>> sys_refindex twice, because the local side can't guess from its TCA
>> config whether there's an opposite field configured for the relation.
>
> I think you misunderstood: This problem has nothing to do with single
> or redundant entries in sys_refindex. THe point is that when you edit
> the foreign side records they may add or delete references which
> requires a call to the sys_refindex api for the local side records to
> update them. This is true even if we do NOT put in redundant entries.
BTW, is the stats fields (the field where the number of items is stored)
updated in both tables correctly for both cases (editing the "local" record
and the "foreign"?
Masi
More information about the TYPO3-team-core
mailing list