Two questions:
1. Do Object Graphs only support "direct-descendant chaining"? (for want of a better term)
Example
$WebUsers = $xpdo->getCollectionGraph('WebUsers','{"Profile":{"SubProfile":{}}}');
In the above example, the only way to get the SubProfile table is to set it up as a direct child of Profile (via a composite/aggregate link in the XML). I cannot seem to get SubProfile to load if it is a direct child of WebUsers.
2. Does newQuery only get fields from the ’parent’ table?
Example
$c = $xpdo->newQuery('WebUsers');
$c->innerJoin('WebUserAttributes','Profile');
$WebUsers = $xpdo->getCollection('WebUsers',$c);
When you turn on debug for the above example, you can dig up this query in the resultant noise:
Attempting to execute query using PDO statement object:
SELECT WebUsers.id, Profile.fullname
FROM `modx_web_users`
AS `WebUsers`
JOIN `modx_web_user_attributes` `Profile`
ON `WebUsers`.`id` = `Profile`.`internalKey`
This SQL actually works when run straight against the database. However, the result only seems to contain fields from the WebUsers table.
How does one extract the field Profile.fullname from the returned collection?