cancel
Showing results for 
Search instead for 
Did you mean: 

TypeDefinition.getChildAssociations() not complete

dbevacqua
Champ in-the-making
Champ in-the-making
Hi

We've noticed that TypeDefinition.getChildAssociations() does not return ChildAssociations from its default Aspects. This seems odd to me but there may be a reason for it.

We can work around the problem, as you seem to have done in LuceneIndexerImpl2.mayHaveChildren(NodeRef nodeRef) in response to a related issue which I posted here:

http://forums.alfresco.com/viewtopic.php?t=3721&highlight=

but it seems rather unsatisfactory. We would be happy to update CompiledModel etc to fix this, either adding a method to getChildAssociationsIncludingTheOnesFromItsAspects (or something more succinct) or just updating the existing one (although this may have unintended consequences) - would you accept such a contribution?

We will work around for now but would be good to hear your thoughts on the subject.

Thanks

Dominic
2 REPLIES 2

davidc
Star Contributor
Star Contributor
I agree that default aspects should be treated as part of the class definition.  However, I think it needs some thought.  It's not just child associations, but also, properties and all other parts of the type.

There's a helper method on DictionaryService which builds an anonymous type based on a passed class and any number of aspects.

dbevacqua
Champ in-the-making
Champ in-the-making
Cheers David - will have a go with that method.

Dominic