1
我試圖使用Salesforce API(使用自定義PatronManager對象)構建應用程序,並且當我運行以下「父對子」查詢時,我收到一條錯誤消息,指出關係是不明白:Salesforce中的關係SOQL PatronManager
SELECT Name, (SELECT PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r) FROM PatronTicket__TicketableEvent__c
然而,當我改變這種並運行了「兒童與父母」查詢,它完美的作品:
SELECT PatronTicket__InstanceDate__c, PatronTicket__TicketableEvent__r.Name FROM PatronTicket__EventInstance__c
任何人都可以揭示爲什麼家長對任何光線 - 小孩查詢給我一個錯誤信息?
謝謝!
斯科特
附加信息
我使用的是企業WSDL的PHP工具包和我得到了以下錯誤消息:
Fatal error: Uncaught SoapFault exception: [sf:INVALID_TYPE] INVALID_TYPE: PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r)^ERROR at Row:1:Column:57 Didn't understand relationship 'PatronTicket__EventInstance__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. in /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php:782 Stack trace: #0 [internal function]: SoapClient->__call('query', Array) #1 /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php(782): SoapClient->query(Array) #2 /home/scott/public_html/salesforce-test/aupac-enterprise.php(16): SforceBaseClient->query('SELECT Name, (S...') #3 {main} thrown in /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php on line 782