How to remove / detach a relation? #1379
Unanswered
rbartholomay
asked this question in
Q&A
Replies: 2 comments
-
Facing the same issue, the direction I am taking is implementing a generic clone method for objects. Then, you don't really remove a child from the relation, but clone it (without its link to the parent), delete it then link the clone to the appropriate parent. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That sounds like a new feature. @oaubert is right. This is the best way to remove it. I think a new method on the model should resolve the problem if i understood it correctly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How can a remove a relation?
I have set up two models with the @onDelete('cascade' decorator. All runs fine. When a delete the model, all related childs are also deleted.
But how can a remove / detach a specific child from the relation?
Bye, René
Beta Was this translation helpful? Give feedback.
All reactions