cancel
Showing results for 
Search instead for 
Did you mean: 

when will the ecm:versionVersionableId is null

Rahul_Mittal
Champ in-the-making
Champ in-the-making

Hi I want to know when ecm:versionVersionableId is set to be null and when it will be not null.

3 REPLIES 3

Rodri_
Star Contributor
Star Contributor

Hello, from the documentation:

ecm:versionVersionableId: the id of the versionable document of a version (the versionable document is the one from which the version was created).

So, according to that definition, the ecm:versionVersionableId property will be null in "main" documents, and it will not be null in versions. So, for example:

  1. You create a new document with ID: XXXXX (this will always have ecm:versionVersionableId to null)

  2. Then, you create a new version of this document (1.0). Then you will have:

  • The "main" document (XXXXX) that points to the last version.
  • The version 1.0 of the document (let's say, with ID YYYYY). This will have "XXXXX" as ecm:versionVersionableId).
  1. If you now create another version (2.0, with ID ZZZZZZ). XXXXX will point that version (but still with ecm:versionVersionableId null), and ZZZZZZ will have YYYYYY as ecm:versionVersionableId.

I hope it is clear!

Rahul_Mittal
Champ in-the-making
Champ in-the-making

Thanks @Rodri

Gregory_Carlin
Elite Collaborator
Elite Collaborator

Can you detail your use cas? Maybe there's a simpler approach.