Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

re-base (firebase) query nested children and sort

I know that firebase recommends you denormalize your database structure... but what if you didn't listen properly...

Example:

  • users

    • user1
      • foo
        • baz
        • bar
      • chats
        • (huge JSON)
    • user2
      • foo
        • baz
        • bar
      • chats
        • (huge JSON)

foo and chats are my way of denormalizing data within each user..

Is it possible to query users/*/foo and sort it by bar?

like image 596
Norfeldt Avatar asked Nov 09 '22 00:11

Norfeldt


1 Answers

No. You cannot perform a query against a sibling property.

like image 60
Michael Bleigh Avatar answered Nov 15 '22 10:11

Michael Bleigh