cancel
Showing results for 
Search instead for 
Did you mean: 

Updating auto-versioned node without version update

masterhard
Champ on-the-rise
Champ on-the-rise
Hello,

I am writing code, which should change node metadata. The node may be versioned, but even if it is, new version should not be created. I use the following code:

            Node destNode = session.getNodeByUUID(nodeRef.getId());
            destNode.setProperty(propName, propValue);
            destNode.save();
Is it possible to update metadata without creating new version?
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
You can turn versioning off for metadata.    It will apply to alfresco as a whole.

Sorry I don't now the property name but I'm sure it will be fairly obvious.

You may also be able to disable the versionable aspect for the current transaction.    That will require some investigation on your part to see if it works.

masterhard
Champ on-the-rise
Champ on-the-rise
I found resolution of my problem: I override definition of bean "versionableAspect" by adding several custom excludedOnUpdateProps. That is not exactly what I was asking for, but this solution ideally suits my actual needs.