Open agarciadom opened 6 years ago
This query had to be rewritten from using select(p:Type|xyz) to using select(p|p.isTypeOf(Type)):
select(p:Type|xyz)
select(p|p.isTypeOf(Type))
var components = Component.all; return components.collect(c|c.countClasses()).sum() / components.size; @cached operation Component countClasses() { return self.OwnedElement.select(c|c.isTypeOf(Class)).size + self.OwnedElement.select(p|p.isTypeOf(Package)).collect(p|p.countClasses()).sum() + self.OwnedElement.select(subc|subc.isTypeOf(Component)).collect(subc|subc.countClasses()).sum(); } @cached operation Package countClasses() { return self.OwnedElement.select(c|c.isTypeOf(Class)).size + self.OwnedElement.select(p|p.isTypeOf(Package)).collect(p|p.countClasses()).sum(); }
This query had to be rewritten from using
select(p:Type|xyz)
to usingselect(p|p.isTypeOf(Type))
: