You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
It seems to be, that with latest
feathers-objection
7.6.0there is no way to set
unrelate
ornoDelete
optionswithin 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
The text was updated successfully, but these errors were encountered: