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
Is there anyway to clone a model that has a self relational field:
id
parent_id
If I set up the protected $cloneable_relations property It doubles up on everything. If i keep that off, it doesn't update the parent_id and keeps it the same as the original element.
Any ideas on how to accomplish this?
Thanks
The text was updated successfully, but these errors were encountered:
If your self-relational models are cloned from another model, try creating an additional relation for just the top-most (where parent_id is null) models and then let the self-relational model clone its children itself:
Is there anyway to clone a model that has a self relational field:
id
parent_id
If I set up the
protected $cloneable_relations
property It doubles up on everything. If i keep that off, it doesn't update theparent_id
and keeps it the same as the original element.Any ideas on how to accomplish this?
Thanks
The text was updated successfully, but these errors were encountered: