perhaps a simple way:

my $rs = $c->model("DB::Group")->all;
while (my $group = $rs->next) {
       for my $user ($ group->users ) {
     # do stuff
       }
}

On Thu, Sep 29, 2011 at 10:04 AM, linuxsupport <[email protected]>wrote:

> Hi,
>
> I have a model called DB where I have 3 classes, User, Group, UserGroup
>
> Now, I have created a resultset for Group ie.
> Myapp::Schema::ResultSet::Group
>
> How can I call User class from Myapp::Schema::ResultSet::Group ?
>
> For example In Group resultset I am working with some groups and want to
> fetch all the users, is it possible?
>
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
>
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to