At this link:http://backendless.com/documentation/data/android/data_relations_retrieve.htm
down the page an example of using the “Where” clause in a BackendlessDataQuery:
Find all contacts in a city for a specific phone book
The example is a simple phone book where the search is for “Contacts”. The “Contact” class does not seem to include a member “PhoneBook[contacts]” that is referenced in the “Where” clause being built. Indeed, “Contact” is a child record of the “contacts” list member and the “owner” member of the “PhoneBook” record.
Two questions arise:
- Can one indeed specify parent records in a “where” clause as may be happening here? E.g. presumably “PhoneBook.contacts” (PhoneBook[contacts]?) is a list member that can include the ID of a one or more “Contact” records, and “PhoneBook.owner” is a scalar member that can be the ID of a “Contact” record.
- If we suppose the only “Contact” member of the “PhoneBook” record is “PhoneBook.owner”, how can one specify that one wants only the “Contact” records that are NOT owners of a “PhoneBook” record? For a test example with some other records analogous to this, it appears the equivalent of neither of these work:
whereClause.append(“PhoneBook.owner IS null”)
whereClause.append(“PhoneBook IS null”)
Is it impossible to accomplish this with a single query? If it is possible to do this, can someone tell us how?
(This is supposed to be a question, moved to that topic area)