InvalidReferenceError in an array with circular dependency #1955
-
Hi, I have this model, Article, which has relatedArticles.
My snapshot is something like:
Doing this works fine:
but in the case where one of the IDs in relatedArticles are missing, I get this error:
I understand that the issue is that 101 article doesn't exist, but I'd like to ignore that and just skip that article id. Is there a way to go about this? I've tried these, but they didn't work:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @carlflor! Do you have a minimal reproducible example of your problem? The second approach you outline in your snippet with the |
Beta Was this translation helpful? Give feedback.
Hi @carlflor!
Do you have a minimal reproducible example of your problem? The second approach you outline in your snippet with the
safeReference
should work. I threw together a tiny example and it works nicely.