SalesforceManager中的关系SOQL

SalesforceManager中的关系SOQL,salesforce,soql,Salesforce,Soql,我正在尝试使用Salesforce API(带有自定义PatronManager对象)构建应用程序,当我运行以下“父到子”查询时,我收到一条错误消息,指出该关系不可理解: SELECT Name, (SELECT PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r) FROM PatronTicket__TicketableEvent__c 然而,当我逆转这一点并运行“child-to-parent”查询时,它可以

我正在尝试使用Salesforce API(带有自定义PatronManager对象)构建应用程序,当我运行以下“父到子”查询时,我收到一条错误消息,指出该关系不可理解:

SELECT Name, (SELECT PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r) FROM PatronTicket__TicketableEvent__c
然而,当我逆转这一点并运行“child-to-parent”查询时,它可以完美地工作:

SELECT PatronTicket__InstanceDate__c, PatronTicket__TicketableEvent__r.Name FROM PatronTicket__EventInstance__c
有人能解释一下为什么父到子查询会给我一条错误消息吗

谢谢

斯科特

其他信息

我将PHP工具包与企业WSDL一起使用,并收到以下错误消息:

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

我是赞助人科技公司的米歇尔。你能直接联系我们的客户服务部吗?使用CustomerManager CRM帮助选项卡中的“支持”链接。你这么做太棒了,我很想进一步讨论


我有一个简单的“暂时”答案(您需要使用PatronTicket\u EventInstances\r复数形式,而不是Instance),但我还想更详细地讨论这一点,因为从技术上讲,Salesforce API不完全支持访问自定义对象(因此我们的自定义对象不一定完全与API配合使用)…

我是赞助人科技公司的米歇尔。你能直接联系我们的客户服务部吗?使用CustomerManager CRM帮助选项卡中的“支持”链接。你这么做太棒了,我很想进一步讨论

我有一个简单的“暂时”答案(您需要使用PatronTicket\u EventInstances\r复数形式,而不是Instance),但我还想更详细地讨论这一点,因为从技术上讲,Salesforce API不完全支持访问自定义对象(因此我们的自定义对象不一定完全与API配合使用)