deep paths with unknown key

32 views
Skip to first unread message

Ronin 161

unread,
Dec 29, 2017, 10:58:51 AM12/29/17
to Firebase Google Group

Is there any way to get all albums by subscriber uid there ?
Something like $database->getReference('albums')->orderByChild('subscribers/__unknown_key__/uid')->equalTo(3234124)->getSnapshot()->getValue();

Kato Richardson

unread,
Dec 29, 2017, 1:39:15 PM12/29/17
to Firebase Google Group
Hi Ronin,

It looks like you already have unique ids for each participant, so using push ids to store them is probably adding complexity to the problem.

I'd restructure the data to store them by their uid and make it a bit easier to query. For example, you could use this approach.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8c3ff322-c106-490e-8de1-d121857c5506%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Ronin 161

unread,
Dec 30, 2017, 11:12:36 AM12/30/17
to Firebase Google Group
You're totally right. Sometime it's good to take a step back and have an external input ;)

Thx !


Le vendredi 29 décembre 2017 13:39:15 UTC-5, Kato Richardson a écrit :
Hi Ronin,

It looks like you already have unique ids for each participant, so using push ids to store them is probably adding complexity to the problem.

I'd restructure the data to store them by their uid and make it a bit easier to query. For example, you could use this approach.

☼, Kato
On Fri, Dec 29, 2017 at 12:24 AM, Ronin 161 <161r...@gmail.com> wrote:

Is there any way to get all albums by subscriber uid there ?
Something like $database->getReference('albums')->orderByChild('subscribers/__unknown_key__/uid')->equalTo(3234124)->getSnapshot()->getValue();

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8c3ff322-c106-490e-8de1-d121857c5506%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kato Richardson

unread,
Jan 2, 2018, 11:28:40 AM1/2/18
to Firebase Google Group
My pleasure. Reach out any time.

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages