Trying to understand relationship queries. Could you please review the quesries that wont work below and comment on what I am doing incorrectly?
I have 2 objects:
Festivals__c (Parent Object to Attendee)
Attendee object has two lookup fields Account & Festivals (name of festival)
These wont work
(Trying to query Attendee Name, Tickets purchased and Festival Name (Master-Detail); going from child to parent)
**SELECT Name,Tickets_Purchased__c,Festivals__r.Name FROM Attendee__c**
(Trying to Query festival Name and attendee name - going from parent to child)
**SELECT Festivals__c.Name, (SELECT Name FROM Attendee__C) FROM Festivals__c**
(Trying to Query Attendee Name, tickets purchased and lookup Account)
**SELECT Name,Tickets_Purchased__c,Account.Name FROM Attendee__c**
These statements work:
SELECT First_Name__c,Tickets_Purchased__c FROM Attendee__c SELECT Festivals__c.Name FROM Festivals__c SELECT Name FROM Attendee__C
Sample Error Messages:
Didn't understand relationship 'Festivals__r' in field path.
Didn't understand relationship 'Attendee__C'
Didn't understand relationship 'Account' in field path