Hi every one and happy new year.
I'd like to know if there's a way to override properties in subtypes.
For example, here is my type :
<type name="myCM:entreprise">
<title>Documents Entreprises</title>
<parent>myCM:doc</parent>
<properties>
<property name=myCM:categories">
<title>Categories </title>
<type>d:text</type>
</property><properties>
</type>
The myCM:entreprise type as the property "categories". In my subtypes, I'd like to override this property with differents lists. I try this code but it doesn't work --> GetModelsDiffs Error :
<type name="myCM:entrepriseAlpha">
<title>Documents Entreprises</title>
<parent>myCM:entreprise</parent>
<overrides>
<property name="myCM:categories">
<title>Categorie de document</title>
<type>d:text</type>
<constraints>
<constraint ref="myCM:listCategoriesAlpha"/>
</constraints>
</property>
</overrides>
</type>
<type name="myCM:entrepriseBeta">
<title>Documents Entreprises</title>
<parent>myCM:entreprise</parent>
<overrides>
<property name="myCM:categories">
<title>Categorie de document</title>
<type>d:text</type>
<constraints>
<constraint ref="myCM:listCategoriesBeta"/>
</constraints>
</property>
</overrides>
</type>
Thanks in advance.
I work with SDK 3.0 and alfresco comunity v5.2
Solved! Go to Solution.
There is a way and the way you went about it looks right. Your main problem is likely the fact that you had already deployed the model without the overrides, and by adding the overrides in a newer version of the model, you have now caused a so call "non-incremental" change of the model. This typically results in issues during model diff as part of the SOLR indexing. Depending on what you have changed, you may simply be fine by reseting all of your SOLR data and reindex. If you already have nodes in the database with one of the sub-types, and your overrides restricted / limited the available set of options, you may have inadvertantly cause some of these nodes to be semantically inconsistent (contain values previously valid but now invalid), which can cause issues during future modifications on these nodes..
There is a way and the way you went about it looks right. Your main problem is likely the fact that you had already deployed the model without the overrides, and by adding the overrides in a newer version of the model, you have now caused a so call "non-incremental" change of the model. This typically results in issues during model diff as part of the SOLR indexing. Depending on what you have changed, you may simply be fine by reseting all of your SOLR data and reindex. If you already have nodes in the database with one of the sub-types, and your overrides restricted / limited the available set of options, you may have inadvertantly cause some of these nodes to be semantically inconsistent (contain values previously valid but now invalid), which can cause issues during future modifications on these nodes..
Hi and thank you very much for your answer.
I'm sorry but I'm totaly new. Could you please tell me how can I resete all of my SOLR data and reindex ?
Thanks in advance.
up please
Hello.
If by "reset all solr data and index" you meant to perform a full reindex, so this is the documentation you should be reading Performing a full reindex with Solr | Alfresco Documentation
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.