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

Relationship methods should have similar options to node methods #84

Open
Ansis100 opened this issue Nov 17, 2023 · 0 comments
Open

Relationship methods should have similar options to node methods #84

Ansis100 opened this issue Nov 17, 2023 · 0 comments

Comments

@Ansis100
Copy link
Contributor

Model.createOne() returns the created model instance. Model.update() returns the updated instance if the configuration parameter return is set to `true.

How come relationships do not have these options? The current alternative is to create/modify the relationship, then perform a findRelationships() to get the newly created data. A return parameter (or implicit return) would help to streamline the actions into a single function call. Relationship methods are also missing, for example, a throwIfNotFound parameter, meaning you have to check and throw the error manually.

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

No branches or pull requests

2 participants