fix eager loading of belongs_to relationships when all keys are null.
This commit is contained in:
@@ -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));
|
$this->table->where_in($this->model->key(), array_unique($keys));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user