Best way to save multiple collections under one user UID

I am writing an app where there is not a lot of interaction with other users. Set and retrieve your own data only.

In Firebase Firestore how could I model this so that everything fits under a users UID?

Something that would look like this?

users/{uid}/user/ users/{uid}/settings/ users/{uid}/weather/

If I want to achieve something like this, then I need to create another UID:

users/{uid}/user/{uid}/{userInfo}

This feels a bit off to me.

Is this wrong?



Read more here: https://stackoverflow.com/questions/67920881/best-way-to-save-multiple-collections-under-one-user-uid

Content Attribution

This content was originally published by Walter Monecke at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: