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

Default relationship of add(), get(), ... #56

Closed
pablo-de-andres opened this issue Jun 22, 2020 · 3 comments
Closed

Default relationship of add(), get(), ... #56

pablo-de-andres opened this issue Jun 22, 2020 · 3 comments
Assignees
Labels
API details 💬 discussion The idea is not mature enough to result in an implementation, and needs further discussion.

Comments

@pablo-de-andres
Copy link
Member

In GitLab by @urbanmatthias on Aug 22, 2019, 14:12

When we add() without specifying a relationship, we currently use cuds.classes.HasPart as a default.
When we get() without specifying a relationship, we currently return all children (i. e. connected with ActiveRelationship or subclass).

Therefore, we have different default relationships (HasPart vs. ActiveRelationship).
Should we change that?

@pablo-de-andres pablo-de-andres added API details 💬 discussion The idea is not mature enough to result in an implementation, and needs further discussion. labels Jun 22, 2020
@pablo-de-andres
Copy link
Member Author

In GitLab by @urbanmatthias on Sep 13, 2019, 11:21

I think the default for add() has to stay, to offer some sort of backward compatibility and a behaviour for cases where the relationships might not be so relevant.

And while the behaviours are indeed different, I believe we also need a filtering option for all the active relationships, since they are most probably what the user will define (while the program maintains the inverses).

So we could make it consistent, but we should make sure there is a way to get all the entities connected through active relationships (possibly entity.get(rel=CUBA.ACTIVE_RELATIONSHIP))

By Pablo de Andres on 2019-09-13T09:21:03 (imported from GitLab project)

@pablo-de-andres
Copy link
Member Author

In GitLab by @yoavnash on Oct 25, 2019, 13:43

removed milestone

@pablo-de-andres
Copy link
Member Author

In GitLab by @urbanmatthias on May 7, 2020, 11:21

closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API details 💬 discussion The idea is not mature enough to result in an implementation, and needs further discussion.
Projects
None yet
Development

No branches or pull requests

2 participants