cancel
Showing results for 
Search instead for 
Did you mean: 

Update custom-model

monocromo
Champ in-the-making
Champ in-the-making
Hi,
I would like update a custom model and i would like remove or add some properties. In alfresco repository there are some file that use mine custom model. How can i update files in the repository? I need to reindex solr when i edit the custom model?
Thanks
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

you can only remove properties safely and without side-effects if no nodes in any of Alfrescos stores uses the affected properties. Otherwise, you need to update your model in a two-step process.

Step 1: Write and execute a patch (subclass of AbstractPatch or AbstractModuleComponent, using Alfresco Java API) or a SQL script to remove the obsolete property values from the database (maybe map them onto some new properties that you can safely add in this step).
Step 2: Deploy updated model with obsolete properties removed.

You only need to perform a reindex if you chose to remove the old properties via a SQL script. If you remove them via the appropriate NodeService API in step 1, SOLR will automatically index these changes and there is no need for a full reindex.

Regards
Axel

monocromo
Champ in-the-making
Champ in-the-making
Thanks, for the reply.