cancel
Showing results for 
Search instead for 
Did you mean: 

How to make version specific associations?

abroadbent
Champ in-the-making
Champ in-the-making
So I'm trying to emulate the functionality of DDI within the alfresco content model (in summary; DDI is a data metadata modelling system loosely based on graph concepts, such as RDF).

One of the things I'm trying to do is implement version persistence for alfresco nodes.

E.g.
I have two alfresco nodes; nA and nB which are of types tA and tB respectively.  Both nodes are at version 1.0.  There is an association between nA and nB which implies that nB is a child of nA.  When I edit nB and it becomes v2.0, nA also gets updated and becomes v2.0 (because of a custom behaviour).

What I'm wondering is; is there a way to make it so that the association works for the specific versions of the nodes. 

I.e.
when I view nA v1.0, it has an association to nB v1.0.  When I view nA v2.0, it has an association to nB v2.0?
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

unfortunately the support for associations to versions is quite limited. All associations are typically to the latest version only. Additionally, it should be avoided to create too many associations as they are really inefficient to lookup via the Alfresco services (no caching, always required to go to database). What I might do in this case would be to keep the association between the latest versions, but use a custom versioning / copy behaviour to add a custom property of type d:noderef to my version node, which references the precise version node (for version 1.0) of the associated document at the time the version is created.

Another matter to consider: Alfresco Share does not have any decent support for viewing versioned documents in document-details. Yes, you can compare the properties over the version history of a single document, but you can't really navigate to the details page of a version node of an associated document, as the UI would likely fail in various places due to lack of the expected content structure / context.

Regards
Axel