
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 08:06 AM
How to edit active model in Alfresco? I know, my aspects will be changed during the life of repository, and when I go into model manager, I wanto edit some data, for example type of data, I can't do it without deactivating a model. And I can't deactivate the model, when it is in use (so if any file has aspects from this model). I can't also remove all aspects from all files, because I will lose some important metadata. What can I do in that situation? I know, it has to be some solution, because I don't believe, that Alfresco doesn't allow to make changes in such important to change things like that. I did't find any solution so far.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 01:38 PM
Hi Tomasz Szymański
Yes, I agree with you that the documentation is not that clear, but as Cesar Capillas​ already said, there is no way to change the data type of a property.
Reviewing the docs, what I think they meant by "you can edit all the fields" is that you can edit the Display Label and the Description fields. Those are aspect's properties.
Properties, the other concept you can think as columns in a table, is another topic. Properties also have properties, like name, type, default values.
Those can not be changed in any way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 10:27 AM
Hi Tomasz:
Until I can say, no editions are possible when a content model is active dynamically - including model manager (or activated in /Data Dictionary/Models). For editing a non-bootstrap model, you have to deactivate the model. And yes, you can not deactivate if you have existing data. So you would have to delete or migrate the existing data....
There is a caveat for this, stopping alfresco service, then localizing your model in alf_data/contentstore, for example grep-ing some property of your content model or based on the date of the creation of the xml, and edit directly there.... Then restart the alfresco service and pray (do not try in production first, please). Be aware besides, that only incremental changes are allowed for content models. You can not change data types of the existing properties in the content model, you can not rename property names or change the existing indexation properties. No problem if you plan to ** add ** new aspects, new types, new properties, new constraints...
If you have to do, you need some kind of migration plan from your initial data to the new model.
Hope this helps.
Regards.
--C.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 05:15 AM
Thank you for your reply, so I assume, I just will add a new aspects if I need to change some data.
But, in Alfresco docomentation (Editing custom types and aspects | Alfresco Documentation) there is information:
Edit the relevant properties.
(...)
- For aspects: For an inactive model, you can edit all the fields except Name. If a model is active, you can edit all the fields except for Name and Parent Aspect.
And if my model is active, it isn't true, that I can edit ALL fields exept name and parent aspect. In fact, on my instance I can ONLY edit Restrictions, and List of Values. Why is that? I don't need to change name nor parent aspect, but if I could edit other fields, like it is written in documentation, it will be a solution for me.
So my question is: How to edit all values exept name and parent aspect in active model, like it is described in documentation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 01:38 PM
Hi Tomasz Szymański
Yes, I agree with you that the documentation is not that clear, but as Cesar Capillas​ already said, there is no way to change the data type of a property.
Reviewing the docs, what I think they meant by "you can edit all the fields" is that you can edit the Display Label and the Description fields. Those are aspect's properties.
Properties, the other concept you can think as columns in a table, is another topic. Properties also have properties, like name, type, default values.
Those can not be changed in any way.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2016 05:26 AM
ThomasZ _​ the Alfresco documentation talks about editing your aspects fields information and properties. This is always possible.
I know, it has to be some solution, because I don't believe, that Alfresco doesn't allow to make changes in such important to change things like that
Well, welcome to Alfresco It's sucks big time for a dev, but i think that this is also one of the things, that makes Alfresco a stable Framework/DMS. This way you will not - and one should not - end up screwing around directly in the Database like ones does with many proprietary systems. Alfresco should be more clear and open about this, since this is imho not a bad thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2016 08:00 AM
The documentation is not clear at this point (there are few things to do if a model is active) and I would like to have a solution from Alfresco too , but when clients told me about changing customized content models with existing data in a non incremental way, I always talk about "a similar situation" in development (saving some distances). When you need to change column names and data types in a custom database table. Your existing data is not coherent yet, your custom app stops working, your app code needs to change, your table schema needs to be migrated and the existing data in the database too. The model manager helps to raise these questions, since some time ago mainly reserved to developers.
Regards.
--C.
