Fix Eloquent eager loading matching.

This commit is contained in:
Taylor Otwell
2012-04-23 16:08:57 -05:00
parent b65fa7040d
commit 94948cf675
8 changed files with 53 additions and 42 deletions

View File

@@ -53,7 +53,7 @@ class Has_One_Or_Many extends Relationship {
*/
public function eagerly_constrain($results)
{
$this->table->where_in($this->foreign_key(), array_keys($results));
$this->table->where_in($this->foreign_key(), $this->keys($results));
}
}