Ian Docherty wrote:
As I mentioned, if I try to do a call to
$c->model('DBIC::UsedPassword')->create_limited( ... ); I get the
fatal error
Can't locate object method "create_limited" via package
"DBIx::Class::ResultSet
Which is why I think this is not the approach, unless you know otherwise?
As I mentioned, if I try to do a call to
$c->model('DBIC::UsedPassword')->create_limited( ... ); I get the
fatal error
Can't locate object method "create_limited" via package
"DBIx::Class::ResultSet
Which is why I think this is not the approach, unless you know otherwise?
would add a method to the User class like:
package My::Schema::User;
...
sub set_password { txn_do(update current password, update used
passwords) }
Then you can say something like:
$c->model('DBIC::Users')->find(42)->set_password('foobarbaz');
and have everything work.
Finally, if you want your create_limited to work, try:
package My::ResultSet::UsedPassword;
use base 'DBIx::Class::ResultSet';
sub create_limited { ... };
package My::Schema::UsedPassword;
__PACKAGE__->resultset_class('My::ResultSet::UsedPassword');
Regards,
Jonathan Rockway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 370 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070913/e31e7ca4/signature.pgp