On Thu, Sep 13, 2007 at 03:14:58PM +0100, Ian Docherty wrote:
Simon Wilcox wrote:
$c->model('DBIC::UsedPassword')->result_class->create_limited();
it works. So that should do for now, thanks Simon and Will for your help ;)
Simon Wilcox wrote:
Will Hawes wrote:
my $used_password =
$c->model('DBIC::UsedPassword')->result_source->create_limited();
S.
Almost, if I do my $used_password =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 ?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()
my $used_password =
$c->model('DBIC::UsedPassword')->result_source->create_limited();
S.
$c->model('DBIC::UsedPassword')->result_class->create_limited();
it works. So that should do for now, thanks Simon and Will for your help ;)
Really don't.
It's utterly broken.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/