[Dbix-class] updating multiple records at once

Aaron Trevena aaron.trevena at gmail.com
Fri Jan 25 20:41:14 GMT 2008


> > I've had a quick google and scan of the docs but can't find anything
> > about updating multiple records at once.

Ash:
> You are lookign for the update method on the result set. go read /
> experiment with that and come back if you cant make sense of it.

On 25/01/2008, Jonathan Rockway <jon at jrock.us> wrote:
> How about:
>
>    $schema->resultset('SomeTable')->search({ records => 'to update' })
>        ->update({ foo => 'bar' });
>
> That's the idea behind the ResultSet; you get one and you do stuff to it

Rawk!

A.

-- 
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Hosting



More information about the DBIx-Class mailing list