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

View File

@@ -71,6 +71,8 @@ class Belongs_To extends Relationship {
}
}
if (count($keys) == 0) $keys = array(0);
$this->table->where_in($this->model->key(), array_unique($keys));
}