3
votes

Firestore allows me to add a field with the type "Reference" to a document. It's a reference "link" to other documents inside the Store.

While I imagine this is very handy, I'm missing documentation on it. I'm having some trouble saving a reference from a Firebase Cloud Function for example. On the client side, I just send a regular "ref" object via the client SDK and it saved the document-reference. In nodeJS (cloud function), I get an error that the object is too deep.

What's the proper way to save a field with the type reference from the admin SDK (and/or JS client SDK)?

1
This question was also asked here stackoverflow.com/questions/46565208/… - Morgan O'Neal

1 Answers

3
votes

The Firebase Admin Node SDK was updated today and fixes this problem. https://github.com/firebase/firebase-admin-node/releases/tag/v5.4.2