Sorry for the late response. I appreciate your explanation. I suggested Mysql because a lot of time an app might be dependent on heavy relationship where I dont find the object oriented view solves it. Actually I just asked a question 2 weeks where the use case was not met using the object oriented view. Let me give you a simplified example where I can’t seem to meet the requirement.
Lets say we have 3 tables
-Room table where users can have post rooms for rent.
-Availability table where it has the room availability posted by the user (say Mondays availability, Tuesday Availability and so on)
-Booking table where the bookings are made against a room.
The Room table has 2 one -to- many relations ships to Availability and Booking, call them Column A and B.
Now here is a use case whereI cant seem to find how we can meet.
I would like to get all the rooms who has availabilities on monday and who has bookings made after todays date. However, I need the availabilities and the bookings matching that condition to be returned as well.
In sql (pseudo code), you can simply get that as follow
select * from Room, Availability, Booking where Room.id = Availability.id AND room.id =booking.id and Availability.day = ‘Monday’ and booking.fromDate > Date(now)
In backendless, when you do the query with the conditions on relationship then you get the right rooms but ALL it relations. You can’t get the relations that match the condition specified.
As you can see, this is an essential part of any JOIN operation where you need the results returned from all the tables based on the conditions passed.
Do you think you have a solution for this using backendless?
What’s happening now is that I get all the relations and in the Java code I filter the ones I don’t need (which kind of defeat the purpose of a query when you have a lot of data)