From 0736cf203b37534848482e47c3afde9b58d6ce27 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 17 Dec 2009 21:32:53 -0800 Subject: 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. --- modules/user/models/group.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/user/models/group.php') diff --git a/modules/user/models/group.php b/modules/user/models/group.php index 3a084684..515788a3 100644 --- a/modules/user/models/group.php +++ b/modules/user/models/group.php @@ -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; -- cgit v1.2.3