[TYPO3-core] RFC: Bidirectioanl MM relations
Franz Holzinger
franz at fholzinger.com
Fri Sep 8 17:24:20 CEST 2006
Hello,
> A vision (not for this patch) is that one day the MM-tables can
> contain additional fields with information that says something about
> the relation.
> Anyway, there is one concern: what about the sys_refindex?
>
> With what you have done I kind of assume that sys_refindex actually
> stores a relation "twice" now. Example:
>
> pages:1 => MM => pages:2,pages:3
>
> So, you edit pages:1. The sys_refindex gets updated; the relation to
> pages:2 and pages:3 is registered.
> So, you choose to edit pages:2 now. The relation from pages:1 to
> pages:2 is shown, you choose to say add or delete something. During
> the saving in TCemain, the sys_refindex is updated for "pages:2".
> Will it add the reference to pages:1 now?
>
Change the fields recuid and ref_uid in sys_refindex:
#
# Table structure for table 'sys_refindex'
#
CREATE TABLE sys_refindex (
record_key varchar(40) DEFAULT '' NOT NULL,
ref_key varchar(40) DEFAULT '' NOT NULL,
KEY lookup_rec (tablename,record_key),
KEY lookup_uid (ref_table,ref_key),
);
Here you can store the string which forms the uid in a MM table:
uid_local : uid_foreign.
Example:
uid_local = 12
uid_foreign = 20
==> record_key = 12:20
Opposite direction of reference:
==> record_key = 20:12
> ould in fact have the most general character.
>
> I'm willing to implement this for you guys when I get a chance to
> test your work. Currently, I'm on an island for myself since my Mac
> completely refuses any SVN connections with any client application
> and I don't know what to do...
Maybe you need an upgrade to the latest SVN version.
Greets,
Franz
More information about the TYPO3-team-core
mailing list