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
My issue here is that I don't want grapher to unset childId field in parent when removing child document because SimpleSchema errors with Child ID is required.
What I want is to provide my own handler where I have to do some checks and potentially even change childId to some other child and not remove it and definitely not nullify it.
I think there should be an option to opt out of everything related to autoremoval/unsetting of fields.
Looking into linker.js it looks like there is no opt-out from autoremove on virtual links.
First, we have _initAutoremove which respects the autoremove flag.
Second, we have _handleReferenceRemovalForVirtualLinks which is called for virtual links if autoremove is false (is this even intended behaviour?).
If _handleReferenceRemovalForVirtualLinks being called when autoremove==false is correct behaviour, then we possibly need another parameter.
If it should be only called when autoremove==true, then we have two functions for handling virtual links removal (I'm counting also the one in _initAutoremove) which seems like it is not intended.
The text was updated successfully, but these errors were encountered:
I have two linked collections:
My issue here is that I don't want grapher to unset
childId
field in parent when removing child document because SimpleSchema errors withChild ID is required
.What I want is to provide my own handler where I have to do some checks and potentially even change
childId
to some other child and not remove it and definitely not nullify it.Therefore,
won't work because I'll be left without a parent.
I think there should be an option to opt out of everything related to autoremoval/unsetting of fields.
Looking into linker.js it looks like there is no opt-out from autoremove on virtual links.
First, we have
_initAutoremove
which respects theautoremove
flag.Second, we have
_handleReferenceRemovalForVirtualLinks
which is called for virtual links ifautoremove
is false (is this even intended behaviour?).If
_handleReferenceRemovalForVirtualLinks
being called when autoremove==false is correct behaviour, then we possibly need another parameter.If it should be only called when autoremove==true, then we have two functions for handling virtual links removal (I'm counting also the one in
_initAutoremove
) which seems like it is not intended.The text was updated successfully, but these errors were encountered: