How can I translate the following SQL query to RQL?
Select bike.* from Bike
inner join Appointment on Bike.BikeID = Appointment.BikeID and
Appointment.Status != 'Booked'
I know that in Mongo it is possible to filter by related documents.
However, RavenDB documentation says that:
It's important to remember that the load clause is not a join; it's applied after the query has already run and before we send the interim results to the projection for the final result. Thus, it can't be used to filter the results of the query by loading related documents and filtering on their properties.
So what is the correct way to run such a query in RavenDB?