Doc #64223 [Opn->Nab]: batchInsert is not returning an array of statuses with "w" set to 1
| From: | derick@php.net | Date: | Sun, 14 Jul 2013 19:42:10 +0000 |
| Subject: | Doc #64223 [Opn->Nab]: batchInsert is not returning an array of statuses with "w" set to 1 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10072@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64223&edit=1
ID: 64223
Updated by: derick@php.net
Reported by: chris at like dot fm
Summary: batchInsert is not returning an array of statuses
with "w" set to 1
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: mongo
Operating System: Ubuntu lucid
PHP Version: 5.3.21
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is how things are supposed to work right now. This will probably improve with MongoDB 2.6.
Previous Comments:
------------------------------------------------------------------------
[2013-02-16 04:22:56] chris at like dot fm
Description:
------------
---
From manual page: http://www.php.net/mongocollection.batchinsert#refsect1-
mongocollection.batchinsert-returnvalues
---
php mongo client 1.3.4 is installed.
Batch insert is only returning a single associative array.
Array
(
[n] => 0
[lastOp] => 5.8454008700988E+18
[connectionId] => 109
[err] =>
[ok] => 1
)
Test script:
---------------
Just do a batchInsert with WriteConcern set to 1.
Expected result:
----------------
An array of arrays with statuses.
Actual result:
--------------
A single array like this:
Array
(
[n] => 0
[lastOp] => 5.8454008700988E+18
[connectionId] => 109
[err] =>
[ok] => 1
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64223&edit=1