I have a relationship many to many. How to refer to the table A, picking up the records of table AB? Do I need an active property in the middle table. In swift.
Hi Ítalo,
Please provide a more detailed schema definition and some sample code you’ve been trying to use.
So your relations are:
- A -> AB
- B -> AB
Right?
And what you want is to query objects from table A AND from table B? With what conditions?
Yes. Bring table “A” records only if the active property of the table “AB” is true
I have a table “User” and a table “knowledge.” A user has a lot of knowledge, and knowledge has many users, then have the user_knowledge table. In the table user_knowledge have the “active” property. I want the records of the user table that has records in the table user_knowledge with active property to true
You can try to use this where clause:
AB[a].active='true'
and query A table:
Backendless.Persistence.of( A.class ).find( query)
This is described in more detailed on this doc page: https://backendless.com/documentation/data/js/data_relations_retrieve.htm#subsetofchildren
Hello, I have simmilar problem, in this case, how can I recieve all Users that have a certain knowledge? In other words A - AB -B.
Very good, solved my problem. Thank you Sergey.