-
Type: Improvement
-
Status: Resolved
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 6.0
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Collections
-
Tags:
Currently Collections are implemented with bidirectional references. A collection keeps a reference of its members in the collection:documentIds multi-valued field. A collection member keeps a reference on the collections it belongs to in collectionMember:collectionIds
Why?
It is obvious that a collection keeps a reference on its members. But why a collection member keeps the reference of the collections it belongs to.
In order to be able to efficiently query the member of a collection with ACLs filtering applying, we have currently no other choice than issuing such following query:
SELECT * FROM Document where ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' AND collectionMember:collectionIds/* = ?
Limitation for Versions
When we check-in a document (i.e. we make a version), its document parts are frozen and cannot be modified anymore. As a direct result, a version document cannot be added to a collection because we are not able to modify its collectionMember:collectionIds field. The same if we were to remove a Version from a Collection.
Evolution
To overcome the limitation, we should get rid of the collectionMember:collectionIds and Collectable document should not keep any reference to the collections it belongs to. To achieve this, we need to make improvement on the NXQL language to be able to issue such query :
SELECT collection:documentIds FROM Collection WHERE ecm:uuid = ? AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted'
which will return a DocumentModel result set (i.e. the collection member) with ACLs filtering.
Which is not possible today.