Browse Source

Fixing most of the failing test

Jose Lorenzo Rodriguez 11 years ago
parent
commit
f268292fe4
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/ORM/EagerLoader.php

+ 6 - 0
src/ORM/EagerLoader.php

@@ -228,6 +228,12 @@ class EagerLoader
                 $options = [];
             }
 
+            if ($options instanceof EagerLoadable) {
+                $options = $options->asContainArray();
+                $table = key($options);
+                $options = current($options);
+            }
+
             if (isset($this->_containOptions[$table])) {
                 $pointer[$table] = $options;
                 continue;