Very strange behaviour of smodel lang.

Hi,

if i write the following code in a $LOOP$ macro:

(node, genContext, operationContext)->sequence<node< >> {
  sequence<node<BusinessProperty>> props = node.getGivenBusinessObject().getPersistentBusinessProperties();

  props.where({~it => it.key; });
}

the $LOOP$ macro should obviously iterate over some BusinessProperties. However, i a property macro inside the $LOOP$, i can access the node.propertyName from the code completion menu, but then i get the error:


access to property "propertyName" is not expected for an instance of BaseConcept


How strange .... what is the problem here? Any suggestions?
Dan
2 comments
Comment actions Permalink
Of course it works if i write:   node : BusinessProperty.propertyName
0
Comment actions Permalink
try writing:
(node, genContext, operationContext)->sequence<node< >> {
  sequence<node<BusinessProperty>> props = node.getGivenBusinessObject().getPersistentBusinessProperties();

  props.where({~it => it.key; }).select({~it => it : BusinessProperty});
}
0

Please sign in to leave a comment.