第一件事,第一件事。由于设计通过查找与其他 2 个对象相关,因此它不是连接对象。联结对象仅当它的 2 个父母与孩子有主从关系时。
我认为您要实现的是遍历父子父关系。您需要在后半部分使用子查询。从文档 - 你去: http: //www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm
Query **child-to-parent relationships**, which are often many-to-one. Specify these relationships directly in the SELECT, FROM, or WHERE clauses using the dot (.) operator.
For example:
SELECT Id, Name, Account.Name
FROM Contact
WHERE Account.Industry = 'media'
This query returns the ID and name for only the contacts whose related account industry is media, and for each contact returned, the account name.
Query **parent-to-child**, which are almost always one-to-many. Specify these relationships using a subquery (enclosed in parentheses), where the initial member of the FROM clause in the subquery is related to the initial member of the outer query FROM clause. Note that for subqueries, you should specify the plural name of the object as that is the name of the relationship for each object.
For example:
SELECT Name,
(
SELECT LastName
FROM Contacts
)
FROM Account
The query returns the name for all the accounts, and for each account, the last name of each contact.