Details
-
Improvement
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
Description
Just a thought for the future: the metadata node is there just to hold a few properties that could better stay in the actual node. All the properties are already prefixed by "mgnl:" so they can be filtered easily when needed. Why not removing metadata nodes at all?
This will bring a bunch of small nice effects:
- reduce (to half) the number of nodes in the repository, improving performances (now every time a node is read, also its metadata node is fetched).
- being able to sort properly on metadatas! A jcr query for sorting on the creation date can be incredibly/unnecessary hard now (try getting all the nodes with "a" in the title sorted by creation date... pretty evil)
- (minor) smaller/more readable xml files for bootstrap
We can easily keep APIs as they are now, since the MetaData class could just fetch the same properties from the main node.
It will require a single-line change in the constructor, from:
this.node = workingNode.getNode(DEFAULT_META_NODE))
to:
this.node = workingNode;
I don't think metadatas are accessed directly in different ways, so updating the APIs as described is probably enough. Redefining the nodetypes declaration and adding a filter for xml import should complete the work.
Checklists
Attachments
Issue Links
- duplicates
-
MAGNOLIA-4640 MetaData as mixin
-
- Closed
-