when will the ecm:versionVersionableId is null

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

0 votes

2 answers

770 views

ANSWER



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

0 votes



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).

3) 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!

0 votes



Thanks @Rodri
02/25/2020