Salesforce API(カスタム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でPHPToolkitを使用していますが、次のエラーメッセージが表示されます。
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