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
@@ -33,6 +33,10 @@ class Group_Model extends ORM implements Group_Definition {
module::event("group_deleted", $old);
}
public function users() {
return $this->users->find_all();
}
public function save() {
if (!$this->loaded()) {
$created = 1;