FAQ

Simon Wilcox wrote:
Will Hawes wrote:
Whoops, my bad. $c->model() does indeed return a
DBIx::Class::ResultSet, so you would need to retrieve/create an
instance of your UsedPassword class from the resultset in order to
call any methods on it:

my $used_password = $c->model('DBIC::UsedPassword')->create( { user
=> 'user', password => 'password' } );
$used_password->foo_method()
IIRC, can't you get the original record source back from the resultset ?

my $used_password =
$c->model('DBIC::UsedPassword')->result_source->create_limited();

S.
Almost, if I do my $used_password =
$c->model('DBIC::UsedPassword')->result_class->create_limited();

it works. So that should do for now, thanks Simon and Will for your help ;)

Regards
Ian

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 17 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedSep 13, '07 at 10:27a
activeSep 14, '07 at 1:35p
posts17
users6
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase