Repository navigation
WIP: add cascade feature to relationships - #1209
Closed
DanRibbens wants to merge 1 commit into
Closed
DanRibbens wants to merge 1 commit into
DanRibbens wants to merge 1 commit into
Conversation
|
What happened to this feature? Is there a reason why this has been closed? |
Contributor
Author
|
I had the right idea but the wrong level of abstraction when I set out to build this. It was closed after the work became too stale to keep it around. We could revisit a the pattern in general. I'd love to see more discussion on this to know if it is a widespread need or not. |
|
Would be very much appreciated! But a best practice workaround would be a good start. Like some sort of hook on the parent collection, but then it would need to work for batch delete as well, not just inefficient document-level hooks. |
|
+1 much needed :) |
|
Related: #11177 |
|
+1 very much needed, would love to retire my garbageCollector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It can be difficult to manage relations to other collections and in some cases it would be better to automatically update related values when a collection is deleted. I named the config property
cascadebut that could possibly be improved.Remaining work:
Implement hook to work with nested paths
Test coverage for cascade relationships on globals
Test coverage for deeply nested relationship fields
Test coverage for cascade relationships inside block fields
Fix an issue where the order of the collections matters. Cascade is working only when relationship fields come before relationTo
I have read and understand the CONTRIBUTING.md document in this repository
Type of change
Checklist: