php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64223 batchInsert is not returning an array of statuses with "w" set to 1
Submitted: 2013-02-16 04:22 UTC Modified: 2013-07-14 19:42 UTC
From: chris at like dot fm Assigned:
Status: Not a bug Package: mongo (PECL)
PHP Version: 5.3.21 OS: Ubuntu lucid
Private report: No CVE-ID: None
 [2013-02-16 04:22 UTC] 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
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-14 19:42 UTC] derick@php.net
-Status: Open +Status: Not a bug
 [2013-07-14 19:42 UTC] derick@php.net
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.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed May 22 03:01:26 2019 UTC