Hi Steevej,
well, I should try this. If it works it is it.
My problem is that I wanted to allow the user to upload data, for which some references were not passed along. Like: an invoice with a supplier, but without providing information from this supplier apart from the mere string of the name.
But now I thing I should just create an id for this supplier and simply not allow in the app entities without id.
I don’t know if that’s the solution. (I do thing so, although I also thought the other way was the solution). But I noticed that managing the inherent complexity of working with both id and string is just huge and not worth it.
Regarding your solution, I think I didn’t explained it well, but the obj.b, in my case, is not present in my app memory. obj is the mongo collection I’m looking it up. The “YourCollectionName”. The ideawas to provide a localField depending on one field in the retrieved object.