Hi,

Is it possible to insert more records using the same code and just adding a certain different field for each record?

I wanted to do something like:

my $rs = $schema->resultset("Table")->new({
# here some more fields defined
});

foreach my $user(@users) {
$rs->user($user);
}

$rs->insert;

This code inserts just the first record corresponding to the first element of @users.

Do I need to create a new $rs for each element of @users?

Thanks.

Octavian


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to