I'm trying to migrate the following structure from real time database to Firestore :
• Resources
o SENT
resId1
• name : xxxx
• url : xxx
resI2
• name ……
o ACCEPT
resId3
etc……
o REFUSED
restIdn
etc….
So under root Node" Resources" I have some sub nodes (SENT, ACCEPT, REFUSED, ...) that contain List of resources items.
With Firestore it seems I can't have subCollection directly under collection (When I try to reproduce this structure with Firestore in the admin console I need to create an intermediate document like:
Collection --> document --> SubCollection --> documents
Witch lead to that structure:
Resources --> SENT --> SENT --> resId1 {name: xxx, url: yyyy}
So the sub node "SENT" is duplicated twice (one for the document and one for the sub collection).
This is not an improvement or a simplification at all, if I compare with firebase real time database.
Do I miss something? What is the best way for such kind of database structure?