How can I fetch all events in user where I have value of workerId and user Id (uid)?
Asked
Active
Viewed 77 times
0
Frank van Puffelen
- 499,950
- 69
- 739
- 734
Roman Czujko
- 31
- 3
-
1Do you know the event ID? – samthecodingman Sep 21 '21 at 10:33
-
No I try to find solution with search, it is intresting to my, I would want to get all events id where workerId = value. Mayby it is posible in firebase ? My task it is get all worker events in user(uid) by workerId. – Roman Czujko Sep 21 '21 at 12:45
-
How Many objects are in secObjects? – PRSHL Sep 21 '21 at 13:31
-
1Queries on the Firebase Realtime Database work on a flat list of nodes, where the value to order/filter on must be at a fixed path under each direct child node. You have **two** unknown keys under `secObjects`, which means that you can't filter on `workerId`. If you want to allow the use case, consider creating a flat list of events, where the ID you've marked in red (`-MjTE...`) is a property inside each event node. Also see: https://stackoverflow.com/q/27207059 and https://stackoverflow.com/q/40656589. – Frank van Puffelen Sep 21 '21 at 14:07