Hello! I've had trouble filtering Firestore queries by information from another table.
For the sake of the example, I want to design an app where a user can:
Search restaurants by location (<- this one is done โ )
Search restaurants where no reservation where made at a specific time (<- my trouble)
Here how I've structured the project:
I have on table called Places with information about restaurants (id, name, latlng, stars google, etc.)
I have a table called Bookings with information about bookings. The table the following columns:
id -> unique Id
placeId -> Document Reference to the Places table
date -> Date (date + hour of the booking)
What I want to do is to :
Filter the restaurants by selection * places from the Places table where location is == to the user's input (request #1)
Take this request, a look into the Bookings table if the items from request #1 have a booking in the table
Return the request #1 without the restaurants with a booking
=> Any idea how to properly do this? :-)