Affects Version/s: 5.0
Sprint:Stetind Sprint 1, Stetind Sprint 2, Stetind Sprint 3, Stetind Sprint 4, Stetind Sprint 5, Stetind Sprint 6
Based on the code produced in #
EZP-20034 find a way to create a low level interface to be able to reuse code across fieltypes for relations.
All relations are stored using ezcontentobject_link table, with some specifics.
Object level relations
In legacy storage object level relations from one content object to a same other content object are merged into single DB row, using ezcontentobject_link.relation_type as a bitmask.
There are three types of relations on object level: common, XML link and XML embed. Common type relations are created manually, while XML link and XML embed type relations are created automatically whenever an internal link or embed tag is created inside XML text field of a content object. For this reason object level relations are not added and removed directly, but through adding rows into ezcontentobject_link table with special op codes, which are processed when content is published.
Attribute level relations
There is only one type of attribute level relations: (obviously) attribute type relations. Thus attribute type relations are never merged using bitmask, also they are manipulated direcly (op codes are not used).