Using collectionGroup Queries for nested commenting has been great. However, if I allow users to delete a comment the abandoned subcollections remain even as the document is deleted. Have you done any kind of cloud function so that when a document is deleted, it checks lower level collections and removes them recursively?
I have an ask: When I do this nested consultation, am I charged for all readings being taken? For example, you asked to consult the comments, but did not initially say where, soon, he will look in the posts collection and in the others, if you know it is in the post collection, I will still be charged for the other collections even if I don't want to include them searching for a collection by group?
Example, I know it is in the posts collection, so it is not necessary to search the collection for quizzes, reports and topics, but he will search them, will firebase charge me for searching these collections?
I want to cater to multiple restaurant clients, should i crea one firestore database with one top level collection for each client or should I create one firestore database for each client? each restaurant admin/owner should see their unique dashboard when they login to the Android app
Does this only work for 1 document who has bunch of nested collections(like u showed end of the video of your backend)? Or can we also query every posts(document)'s collection called "comments" and their nested comments with 1 command?. That would be crazy....Great video
I tried to copy your rules at 3:19 just to get it working and I get a series of errors that I am too unfamiliar with firestore rules to figure out what is wrong. Any help would be appreciated. Error saving rules - Line 9: Unexpected '=='.; Line 9: Missing 'match' keyword before path.; Line 9: mismatched input 'path' expecting '}'; Line 9: Missing 'match' keyword before path.; Line 10: mismatched input 'allow' expecting {'{', '/', PATH_SEGMENT}; Line 12: Unexpected '}'. rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if false } match /{path==**}/roles/{id} { allow read, write; } } }
Can I get all subcollections of a certain set of documents, such that the documents appear in a list of *document IDs* that I provide? I.e. put a condition on the ID of the subcollection's parent document
Hey just wanted to know something from you. I heard a lot of people say that you should not deeply have sub-collections in firestore for efficiency. Is it right????
Great video, but if I have a query which gave me an array of comments of a post, Is there any way I can also get user data using the reference uid in the post? somewhat of a SQL join, or is that still impossible in Firestore?
Hi Jeff, does this appear in your master architecture course? And does this mean we no longer have to build up on the root collections list like we did before for easily searching relationship data? Or is there still a limitation here? Thanks
Awesome video! Thank you. What you think is the biggest advantage of CollectionGroup over a normal Collection query. Isn't simple to mimic the same behavior with a top level Collection?
Do someone know how to make geolocation queries on subollection it would be very helpfl for me.. I ve tried geofirex but works just on collections... Please...
Hello! If somebody has solved the issue of joins in firestore by any method so please forward us the code or logic or please explain me! Its really urgent and important. Thanks.
Again.. a powerful feature explained in simplest of words. Hours of research put together in minutes of video. You are the best Jeff !!
Exactly what i needed, like its 100% exact case I'm facing
Thanks for the overpowered video 🎉❤
This is what i was looking for last 30 days
Thanks a lot
Very nice and helpful video thankyou so much 🙏🏼 🙏🏼🙏🏼
I wish I could upvote this a million times. I hope that this channel makes you a zillionaire dude you deserve it
Please more videos about collection group queries
This was helpful. What about the Firestore rules that goes with them. Can you do a course on Firestore rules? This needed. Especially advanced rules.
This is amazing, yet another feature I was anxiously waiting to use.
I really thanksful your video. I didn't know make all collection in same name! It's really good solution thanks
THANKS JEFF!!!! This tutorial is great!
2 videos in one week, very nice. 😍😍😍
Clicked on video, immediately liked, was not disappointed.
Collection Group Queries are awsome
I agree!
Thanks and very helpful. I would suggest to do more videos on firebase analytics and AB testing etc.
I will do that soon, specifically for iOS/Android. It unlocks some of the best features in Firebase
@@Fireship Yeah it will be very helpful
Fireship 👍🏼
Awesome video as always Jeff!! It would be very cool if you could do a full course on firebase Rules.
Finally, great job Jeff ^_^
Using collectionGroup Queries for nested commenting has been great. However, if I allow users to delete a comment the abandoned subcollections remain even as the document is deleted. Have you done any kind of cloud function so that when a document is deleted, it checks lower level collections and removes them recursively?
Super cool new feature! But now, you have to review your data modeling course :-p
Already added a new section 😁
Thank u for this awesome video
Great! I have been waiting for this!!!!!
I have an ask:
When I do this nested consultation, am I charged for all readings being taken? For example, you asked to consult the comments, but did not initially say where, soon, he will look in the posts collection and in the others, if you know it is in the post collection, I will still be charged for the other collections even if I don't want to include them searching for a collection by group?
Example, I know it is in the posts collection, so it is not necessary to search the collection for quizzes, reports and topics, but he will search them, will firebase charge me for searching these collections?
The collectionGroup has to be handled with care! It can create an excessive amount of reads in firestore and that leads to a bunch of bucks burned 😀
I want to cater to multiple restaurant clients, should i crea one firestore database with one top level collection for each client or should I create one firestore database for each client? each restaurant admin/owner should see their unique dashboard when they login to the Android app
Does this only work for 1 document who has bunch of nested collections(like u showed end of the video of your backend)? Or can we also query every posts(document)'s collection called "comments" and their nested comments with 1 command?. That would be crazy....Great video
I tried to copy your rules at 3:19 just to get it working and I get a series of errors that I am too unfamiliar with firestore rules to figure out what is wrong. Any help would be appreciated.
Error saving rules - Line 9: Unexpected '=='.; Line 9: Missing 'match' keyword before path.; Line 9: mismatched input 'path' expecting '}'; Line 9: Missing 'match' keyword before path.; Line 10: mismatched input 'allow' expecting {'{', '/', PATH_SEGMENT}; Line 12: Unexpected '}'.
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false
}
match /{path==**}/roles/{id} {
allow read, write;
}
}
}
thank you very much bro, great video
Can I get all subcollections of a certain set of documents, such that the documents appear in a list of *document IDs* that I provide? I.e. put a condition on the ID of the subcollection's parent document
Thanks it helped alot
Does it count as 1 read for each Group Query? Or it is depends on how many comments return from that query in this example?
Hey just wanted to know something from you. I heard a lot of people say that you should not deeply have sub-collections in firestore for efficiency. Is it right????
If I want to query common likes on an object in the db, between a user and users they follow, would this be the best way to go?
What is the name of the background music you use in your videos?
Great video, but if I have a query which gave me an array of comments of a post, Is there any way I can also get user data using the reference uid in the post? somewhat of a SQL join, or is that still impossible in Firestore?
Is there a way by which I can put where clause in subcollection and get result of parent collection.
How do you a collectionGroup query limited to items under one node? For example, limited to comments made within chats of a particular organization.
Google has done Phd in making things complex
saved hell lot of time
Hi Jeff, does this appear in your master architecture course? And does this mean we no longer have to build up on the root collections list like we did before for easily searching relationship data? Or is there still a limitation here? Thanks
my brain is bleeding... haha! i guess i need to research more to understand... still, great vids... 😅
Awesome video! Thank you. What you think is the biggest advantage of CollectionGroup over a normal Collection query. Isn't simple to mimic the same behavior with a top level Collection?
R u a saint?
in 2021, did they just remove it again from firebase? I can't find it
Awesome!
So there was a time when Jeff used to not sound like a robot. 😯
Thanks Jeff. Now how about refactoring this for Flutter with Provider?
Make one with react
Seems like a lot of people having the same problem hence so excited for this HAHAH
Do someone know how to make geolocation queries on subollection it would be very helpfl for me.. I ve tried geofirex but works just on collections... Please...
How can I implement this in Android jecpack compose?
Reads title
*_YEET_*
how do it this with vue?
Can anyone please tell
Either solutions for
Shorting data using two child by set query
Can you please create a firebase v9 migration guide.
Hello! If somebody has solved the issue of joins in firestore by any method so please forward us the code or logic or please explain me! Its really urgent and important. Thanks.
You didn't show the output in UI of .collectionGroup call. 😐 But still 🔥🔥...
Please slow down.
Was Here first...lol
Talking too fast. Consider that the audience trying to understand this
buh
Every thing was great until he started using angular 😖