I am trying to learn Querying sObject Relationships through the APEX workbook (http://www.salesforce.com/us/developer/docs/apex_workbook/apex_workbook.pdf ) I have 2 objects with a master relationship, in the booklet says that I can query the parent just by specifying the relationship, but for some odd reason the result is quite unexpected
list<Line_Item__c> s = [SELECT Name, Unit_Price__c,Merchandise__r.Price__c,Merchandise__r.Name, Merchandise__r.Description__c FROM Line_Item__c];
system.debug(s);
16:42:24:062 USER_DEBUG [11]|DEBUG|(Line_Item__c:{Name=2, Merchandise__c=a039000000APTh3AAH, Unit_Price__c=200.00, Id=a029000000BuFUuAAN}, Line_Item__c:{Name=1, Merchandise__c=a039000000APTh2AAH, Unit_Price__c=1.50, Id=a029000000BuKcNAAV}, Line_Item__c:{Name=1, Merchandise__c=a039000000APTh2AAH, Unit_Price__c=1.50, Id=a029000000BtuHCAAZ}
I am quering 5 fields but only obtaining 4, and 2 of them are ids when it should be text fields