I noticed that there remains the relationship with the
id
when the actual record is deleted.
Is there any way to configure
cascade
on deletion?
So the record is removed from everywhere it is being used..
isn't it what 'depth' is supposed to do (haven't checked it on a delete though)?
Depth, as per my knowledge, is only used to retrieve relationship records. I'm using it for that purpose.
We plan on supporting this in the future.
Discussion here:
https://github.com/payloadcms/payload/discussions/655WIP PR here:
https://github.com/payloadcms/payload/pull/1209
You may be able to pull this hook code and get it to work for you:
https://github.com/payloadcms/payload/pull/1209/files#diff-940fd22076f9f638d0ae100073d0c1b92b008755af9c62eb6812ae93f614e546Hey @denolfe @dribbens is there any update on the cascading relationships PR? Would be awesome to get this merged in as we'd find it useful.
has this been implemented in the main branch?
Also wondering about this, it would be neat to have this feature.
I'll bring this up with the team and prioritize appropriately
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.