Browse Source

Source is not alias

Or rather, it isn't when it's a plugin model - set to the registry alias
so that hydrated results know from which table class they were created.
AD7six 11 years ago
parent
commit
8364de8851
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ORM/ResultSet.php

+ 1 - 1
src/ORM/ResultSet.php

@@ -472,7 +472,7 @@ class ResultSet implements ResultSetInterface
             $results[$defaultAlias]['_matchingData'] = $results['_matchingData'];
         }
 
-        $options['source'] = $defaultAlias;
+        $options['source'] = $this->_defaultTable->registryAlias();
         $results = $results[$defaultAlias];
         if ($this->_hydrate && !($results instanceof Entity)) {
             $results = new $this->_entityClass($results, $options);