FAQ
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 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: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110929/6e66d41d/attachment.htm

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedSep 29, '11 at 5:04p
activeOct 1, '11 at 10:37a
posts4
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase