A custom object B has a custom field, which is a Lookup on custom object A.
So this means that for each B there can be only ONE A, yes? And multiple B's can have same A, or a single A can have multiple B's related to it, correct?
From above, I'm doing :
SELECT A__c.Id, A__c.Name, (SELECT B__c.Id, B__c.Name FROM B__c) FROM A__c
It is NOT working.
And ofc the code below wont even work, right?
SELECT Id, Name, A__c.Id, A__c.Name FROM B__c
What am I doing wrong here? I am completely out of my depth here. Complex SOQL relationships hurt my brain just thinking about them.
The field on object B__c reads :
Related object - Related_object__c - Lookup(object)
SELECT A__r.Id, A__r.Name, (SELECT B__r.Name FROM B__c) FROM A__c
but yet again, its not working.