I have a document structure of:
/uploads/${USER_ID}/items/${UUID}
I can successfully listen for changes on the document at the end of the path, for example
firestore
.collection("uploads")
.document(configService.getUserId())
.collection("items")
.whereEqualTo("owner", configService.getUserId())
.addSnapshotListener(this::onEvent);
}
But how can I listen to all changes on /uploads/*
for changes, without iterating through all documents attaching listeners (Seems very inefficient)?
I naively tried
firestore
.collection("uploads")
.addSnapshotListener(this::onEvent);
}
However, it's not triggered when changes are made down the path.