Open drewdearing opened 4 months ago
It looks like this is not currently supported, unless I'm missing something. I can do something like this, but I can see this getting very annoying to deal with in situations where I have a triple nested collections.
You're right. I planned to allow accessing doc/ref subcollections through sub
property, but I never got to implement it.
It would look something like this:
item.sub.sub_items.all()
item.sub.sub_items.all()
All I can say is that is exactly what I am looking for. Would be happy to look into it as well if I get the time. I can predict having to write out the db collection chain on every query will become quite ruthless.
I have a nested collection db.
When I access an Item Doc, I expect to be able to query the sub items directly from the item using some instance method.
It looks like this is not currently supported, unless I'm missing something. I can do something like this, but I can see this getting very annoying to deal with in situations where I have a triple nested collections.
It basically means I need to store the ref of every ancestor doc in my sub_item doc in order to access the sub_item's subcollection.
Please tell me I'm missing something.