There are 3 objects Books__c, Reader__c, Borrowed_by__c.
There is a master-detail field on Borrowed_by__c with Books__c. There is a lookup relationshp field on Borrowed_by__c with Reader__c
I am trying to retrieve the field of these objects in single query. I am using the below queries.
This query is giving results.
select id, name, reader__r.name, from Borrowed_by__c
These below query are not giving results.
select id, name, reader__r.name, books__r.name from Borrowed_by__c select id, books__r.name from Borrowed_by__c select id, (select id, name from books__r) from Borrowed_by__c
The child relationship names are correct. What should I modify in my query to get the fields of both Books__c and Borrowed_by__c or peferably 3 related objects ?