Require subquery to implicitly copy class within query

Open
#86 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

This issue has not been assessed yet.

Description

area: language

Currently, a source class is implicitly copied when it is referenced, but no explicit mapping exists. Example:

from Restaurant create {
  it.sells
}

The query copies the sells reference which references the Food class. Given that the Food class is not explicitly created elsewhere, it is implicitly copied from the source model including all features and possibly recursively.

The proposed change is to require an explicit subquery in this case:

from Restaurant create {
  it.sells create Food
}

Note that this does not affect the recursive nature of the copy. So in case Food contains a reference to another class which is not created explicitly, it is still copied implicitly and recursively.

Pro:

  • more explicit when classes are created

Contra:

  • requires writing the class name because it.sells create is not allowed within the grammar because it would lead to ambiguous parsing
Dominant language
Java
Stars
3
Forks
6
Avg merge
19h 10m
Merged PRs (30d)
34

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vitruv-tools/NeoJoin

All issues in vitruv-tools/NeoJoin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.