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

upsertGraphOptions unrelate #193

Open
zanzara opened this issue Nov 22, 2023 · 1 comment
Open

upsertGraphOptions unrelate #193

zanzara opened this issue Nov 22, 2023 · 1 comment

Comments

@zanzara
Copy link

zanzara commented Nov 22, 2023

It seems to be, that with latest feathers-objection 7.6.0
there is no way to set unrelate or noDelete options
within the upsertGraphOptions param .

At least it has no effect. The implicit query wnat's to delete the foreign item, which leads to an ForeignKeyError due to having 'RESTRICT' in onDelete (instead of CASCDE which I don't want to have).

Overwriting the patch method of the class (better said, not to call the super.patch)
and calling directly
await this.options.model.query().upsertGraph({id, ...data}, {noDelete: ['roles'], unrelate: true})
does work instead in my case.

Can anyone confirm?
TIA

@zanzara
Copy link
Author

zanzara commented Nov 29, 2023

f-o seems to be dead as a horse can be dead.
Sry.

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