In Kohana 2.4, ORM no longer does the find_all() call for us when we

retrieve related ORMs.  If we tack a find_all() on the end, it breaks
the User_Definition interface so create User_Model::groups() and
Groups_Model::users() as glue.
This commit is contained in:
Bharat Mediratta
2009-12-17 21:32:53 -08:00
parent 9d19e272d6
commit 0736cf203b
5 changed files with 13 additions and 5 deletions
+4
View File
@@ -61,6 +61,10 @@ class User_Model extends ORM implements User_Definition {
md5($this->email), $size, $default ? "&d=" . urlencode($default) : "");
}
public function groups() {
return $this->groups->find_all();
}
public function save() {
if (!$this->loaded()) {
$created = 1;