Fixing SQL errors when trying to eagerload associations from empty
results, fixes #3167 and #3113
Using the API instead of re-implementing
Merge pull request #3182 from cakephp/3.0-eagerloader-fixes

Fixing SQL errors when trying to eagerload associations from empty results