Hello,
I'm trying to use the Perl MongoDb module to extract a list from mongo, alter the data and replace the original list. The replace operation has gone wrong. I have tried this code:
$col->update( { "host" => $host }, { '$set' => { "timestamp" => [ @new ] } }, { 'multiple' => 1, 'safe' => 1 } ) || die "$!";
This does not seem to work as the list is emptied by the update. What have I done wrong?
Neil Watson
watson-wilson.ca
In reply to MongoDB replacing an array by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |