Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAllNodes Should Return Subclass Nodes #91

Open
BentleyJOakes opened this issue Nov 6, 2020 · 0 comments
Open

getAllNodes Should Return Subclass Nodes #91

BentleyJOakes opened this issue Nov 6, 2020 · 0 comments
Labels
compat-breaking Any changes must be carefully performed to avoid breaking backwards compatibility. enhancement New feature or request

Comments

@BentleyJOakes
Copy link
Member

  1. Create metamodel with A and B, B inherits from A
  2. Create a model with A's and B's
  3. Write a rule and have getAllNodes('A') in the LHS condition
  4. Observe that the B nodes are not returned.

Reason: In mmmk.js, lines 692-705, the '$type' of the node is directly matched against.

Proposal: getAllNodes should be extended with an extra boolean parameter 'includeSubclasses' which then instructs the function to include the sub class nodes.

@BentleyJOakes BentleyJOakes added the enhancement New feature or request label Nov 6, 2020
@BentleyJOakes BentleyJOakes added the compat-breaking Any changes must be carefully performed to avoid breaking backwards compatibility. label Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat-breaking Any changes must be carefully performed to avoid breaking backwards compatibility. enhancement New feature or request
Development

No branches or pull requests

1 participant