cancel
Showing results for 
Search instead for 
Did you mean: 

duplicate property in custom model

mattv
Champ in-the-making
Champ in-the-making
Hi,

I have the following content hierarchy :

A, B, C types extending type X which in turns extends cm:content.

I would like A and B to have an additional property but not C.
So i thought I could add the same property on the A type and on the B type.

But when I start alfresco, I get a "DictionaryException: Found duplicate property definition".

Am I forced to use two different property names for the same property ? Or maybe define the property on another level (but not on the X type) ? Or is there something I don't understand right.

Thanks for your help.
4 REPLIES 4

gilles
Champ in-the-making
Champ in-the-making
Hi,
did you get an answer for that?
Thanks,
Gilles

legolas
Champ in-the-making
Champ in-the-making
Hi,

I am facing a similar problem. Is there an answer to this?
Thanks,
Marcel

mxc
Confirmed Champ
Confirmed Champ
Did anyone find a solution to this? The answer is to use aspects instead.

http://forums.alfresco.com/forum/developer-discussions/content-modeling/custom-model-context-initial...

abarisone
Star Contributor
Star Contributor
Yes,
you should use aspects and the apply them to the class.
Say, one aspect containing the property/properties you want to add applied to types A and B.
You can define multiple aspects which are a combination of properties, which can be defined only once.

Regards,
Andrea