Extremely large inner DocumentReferences #12959
Labels
api: firestore
Issues related to the Firestore API.
needs more info
This issue needs more information from the customer to proceed.
type: question
Request for information or clarification. Not an issue.
I am successfully recovering documents from firestore using the this package. Yet, one thing that I find really strange, is that my data models have some inner references to other DocumentReferences and while I would expect those references to be very light, like a string with the path to the document, they in reality are very large objects.
As an example, I have a data mode like "exam". The exam has documentReferences to another User document and a patient reference.
If I use documentSnapshot.ToDictionary(), the resulting dictionary is so large, that if I try to parse into a json and print it into the screen, I run out of memory. Yet, those documents should be very very light, less than 0.1 mb of data.
From this dictionary, If I capture a DocumentReference alone, and save the resulting as a Json string, the resulting text file is more than 5mb of data.
Am I doing something wrong, or is there another way to force those DocumenReferences have less information? Following is my code:
The text was updated successfully, but these errors were encountered: