Enhancement
Major
Detail
Detail
The values of all composition references are currently saved in a table. This has the advantage that it can be ensured on the database side that an element cannot be assigned in 2 different references.
The disadvantage is that all assignments are stored in this one table and it can become very large. Furthermore, the association cannot be saved inline in the "part".
Improvement
The paradigm that the database ensures that an element is only contained in one composition reference is abandoned. It should be possible to specify a separate association table.
Data migration
The attributes tl.element:StructuredElementContainer#children and tl.elementStructuredElement#parent have become abstract and must be overwritten. If the application defines a structure with the help of StructuredElement, there must be a common superclass of all objects that can appear as children and a common superclass of all classes that can have children. If there are no such classes, they can be created using the following pattern:
- Creation of a superclass of all children and a superclass of all parents. The names StructuredElementExt and StructuredElementContainerExt are only examples and should be adapted accordingly: {{{
<interface name="StructuredElementExt"> <generalizations>
<generalization type="tl.element:StructuredElement"/>
</generalizations> <attributes>
<reference name="parent"
kind="backwards"
override="true"
type="StructuredElementContainerExt"
/>
</attributes> </interface> <interface name="StructuredElementContainerExt"> <generalizations>
<generalization type="StructuredElementExt"/>
<generalization type="tl.element:StructuredElementContainer"/>
</generalizations> <attributes>
<reference name="children"
override="true"
type="StructuredElementExt"
/>
</attributes> </interface> }}}
- Interfaces and classes in the structure that extend tl.element:StructuredElement must then extend StructuredElementExt and extensions of tl.element:StructuredElementContainer must become extensions of StructuredElementContainerExt.
Test
Is used in the DemoTypes and tl.doc modules.