cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a dynamic model

samuel_penn
Champ in-the-making
Champ in-the-making
Hi all,

Alfresco 3 has a nice feature of being able to define a new aspect/type in the Data Dictionary/Model part of the repository, and this seems to work as expected. However, I've noticed a problem if I need to make a change to the aspect. The model can only be changed if it has been deactivated, but it can't be deactivated if there is any content in the system which is using it. If I want to add a property to an aspect, I have to first delete all content before updating the model.

If I were to instead define the aspect the 'old way', by adding a custom model definition in the extensions folder, then I'm able to add new properties to an existing aspect which has been applied to content, and it all works fine when the server is restarted.

Have a missed something, and it is possible to update dynamic aspects which are being used (the wiki suggests I haven't)? Is there a workaround of some kind?

As it stands, it appears that non-dynamic models are more flexible than dynamic ones. Is this true?

Thanks,
Sam.
4 REPLIES 4

rmorant
Champ in-the-making
Champ in-the-making
I found the same problem.
And when try to set the active status off, or delete the model then show me :
A system error happened during the operation: 10060014 Failed to validate model delete - found 2 nodes in store archive://SpacesStore with TYPE '{http://www.someco.com/model/content/1.0}doc

even if delete the space store and all the content data, the message still there.

This topic talks about the same
http://forums.alfresco.com/en/viewtopic.php?f=7&t=16599&p=54532&hilit=Dynamic+Models+delete#p54532

¿some body found a workaround?

jayjayecl
Confirmed Champ
Confirmed Champ
I don't think that dynamic models have to de deactivated before being updated. Why do you say that ?

invictus9
Champ in-the-making
Champ in-the-making
1) Using the dynamic model you have to delete all occurrences of the content type from the server. That means that once you have deleted the files and folders, you then go to your personal profile and select Manage Deleted Items, and permanently delete the items. This is very scary, as I'm having nightmares about future maintenance.

2) You have to disable the current dynamic model definition somehow. If you do not disable it first, Alfresco will complain that the change is not "additive" [sic]. Making the content type definition inactive or deleting the file will disable it, but you have to delete all files of that content type (see above) first. I have not played with making it inactive yet.

rmorant
Champ in-the-making
Champ in-the-making
select Manage Deleted Items, and permanently delete the items.
Thank you.