01-08-2019 05:47 AM
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
01-11-2019 07:15 AM
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..
01-11-2019 07:15 AM
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..
01-14-2019 01:26 AM
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.
02-21-2019 11:38 PM
up please
04-22-2019 12:32 PM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.