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

How to represent multiple containement relationships between two entities ? #827

Open
NicolasAnquetil opened this issue Sep 24, 2024 · 0 comments

Comments

@NicolasAnquetil
Copy link
Contributor

Some entities have multiple containment properties (see also #160):

  • TClass is TPackageable and therefore contained in a TPackage + in Java a TPackage is a also a TNamespace, so a class is also contained in this namespace
  • same for TMethod contained in a TClass + a TClass is also a TNamespace

We would like

  • both relationships stored in the same instance variable (to save memory space)
  • both relationships accessible with either accessors (#parentPackage/#parentType and #parentNamespace)

Traits have a #explicitRequirement marker for methods (kind-of 'abstract'), may be TNamespace should declare a #parentNamespace as an explicitRequirement and would force each meta-model to define how to implement it:

  • TClass >> parentNamespace --> #parentPackage
  • TMethod >> parentNamespace --> #parentType

Ideally there would be a way to declare this in the generator DSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant