cancel
Showing results for 
Search instead for 
Did you mean: 

Aspect gone, but properties persist

srowsell
Champ in-the-making
Champ in-the-making
I will describe a situation, and perhaps someone will be able to think of a way out of it.

I had a model which turned out to be problematic.  The name of the aspect was "sm:documenttype", and its property of interest was "sm:documentType".  The closeness of these names caused some confusion for Alfresco, I think, to the point where it was throwing SQL exceptions in the logs.  (I don't yet know that that was the reason, but it's my working hypothesis.)

So I got rid of that model.  I ran a script which removed it from every node in the repository, well over a million now.  And then I made the model inactive, so there is no more model.

When I changed the model and then tried to make it active, Alfresco wouldn't let me.  Eventually I figured out why:  the property persists.  When I do a search like:

+@sm\:documentType:"eStatement"

nodes are returned, and when I look at the node properties I see that one of them is

{sm.model}documenttype       eStatement                    

(note that the spelling is precise; I asked for documentType and Alfresco is showing me documenttype)

and there is nothing in the list of aspects to account for this property.  It is a property without an aspect.

So now I have to try to get rid of a whole bunch of these properties, and I have no idea about how to do that.

I would welcome suggestions.

Steve
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
The search index will also have the old property and type values.

Had you removed the aspect from the affected nodes then it would have also removed the properties associated with that aspect.   Now you have residual properties.

I suggest you add a very different namespace for your new model and ignore the old junk.   If the old junk bothers you then you will need to continue fixing it with database scripts.   And then reindex.

srowsell
Champ in-the-making
Champ in-the-making
My script did remove the aspects, which is why I'm confused about the presence of the properties.

As it happens, I'm already doing it the way you suggested:  I have created a new model which can't have its aspects and properties confused, and I'm in the process of attaching the new aspect now.  The old properties would bother someone with OCD, I suppose, but I'll find a way to ignore them.  I just can't justify spending any more time on the old model.