10:41 <@mst> marcus:
$obj->result_source
->resultset
->search($obj->ident_condition)
->update({ id => $new_id })
From the #dbix-class channel on irc.perl.org
If you use Catalyst auth with hashed passwords, here's how to create the digest in your DBIx::Class user class automatically.
sub store_column {
my ($self,$col,$val)= @_;
$val=Digest::SHA::sha1_hex($val) if ($col eq 'password');
return $self->next::method($col,$val);
}
sub store_column {
my ($self,$col,$val)= @_;
$val=Digest::SHA::sha1_hex($val) if ($col eq 'password');
return $self->next::method($col,$val);
}
I held a lightening talk on monday called 'DBIx::Class from 1.000 feet' at the Extreme Programmers meetup in Oslo. The audience was mostly Java programmers, so I didn't go too much into detail, but I thought it was a nice oportunity to show them that Perl isn't dead. :)
Here is the slides if anyone's interested.
Here is the slides if anyone's interested.
22:28 <@mst> my ($high_price) = $item->search_related('bids', undef, { select
=> [ { max => 'price' } ], as => [ 'price' ], group_by => 'id'
})->cursor->next;Pretty neat, eh? :)
