cancel
Showing results for 
Search instead for 
Did you mean: 

Add Versionable aspect by default

msmith
Champ in-the-making
Champ in-the-making
Hello,

I've been enabling "auto-versioning" for content by creating a content rule at "Company Home" that adds the aspect for new content.

I've read in the Wiki that I can change the content model to achieve this, but that it is not offically supported:
http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Modifying_an_Alfresco_Content_Model

Is there another, better way of doing this or should I just stick with the content rule?
3 REPLIES 3

jbarmash
Champ in-the-making
Champ in-the-making
I am not quite sure why the wiki says it's not supported, having versionable as mandatory aspect is a better way than content rules.  So I'd recommend doing that.

pmonks
Star Contributor
Star Contributor
I believe what's not recommended is changing the content models shipped with the product (ie. the models in /alfresco/model/contentModel.xml).  This means you shouldn't change any of the out-of-the-box "cm:" types, even if it's as innocuous a change as adding the versionable aspect as a mandatory aspect.  The reason for this is that Alfresco reserves the right to modify the out-of-the-box models at any time, so if you modify them chances are your modifications will be lost during an upgrade.

That said you can accomplish the same thing by adding your own custom type (which inherits cm:content), making the versionable aspect mandatory for that type and then (if it's a requirement) making that type the default type for all newly created content.

Cheers,
Peter

msmith
Champ in-the-making
Champ in-the-making
I asked Alfresco support and got this response:
"I think you would be safest by using the rules but you are free to use that method but it is not officially supported."

So, we will stick with content rules for now.

Thanks!