Joins only support TO_ONE relationships

  • Thread starter Thread starter Robert9
  • Start date Start date

Robert9

Guest
Member
To show watched resources we use:

Code:

Code:

Code:
        $finder
            //->with(['full', 'fullCategory'])
            ->with('Watch|' . $userId, true)
            ->where('resource_state', 'visible')
            ->setDefaultOrder('last_update', 'DESC');
This results in

Code:

Code:

Code:
SELECT `xf_rm_resource`.*, `xf_rm_resource_watch_Watch_1`.*
FROM `xf_rm_resource`
INNER JOIN `xf_rm_resource_watch` AS `xf_rm_resource_watch_Watch_1` ON (`xf_rm_resource_watch_Watch_1`.`resource_id` =...
...

Read more

Continue reading...
 
Top