fix eager loading of belongs_to relationships when all keys are null.

This commit is contained in:
Taylor Otwell 2012-04-24 10:37:40 -05:00
parent 47b60135bb
commit 1dea9852a9
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,8 @@ public function eagerly_constrain($results)
}
}
if (count($keys) == 0) $keys = array(0);
$this->table->where_in($this->model->key(), array_unique($keys));
}