Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1427

MongoCollection::distinct() should ensure query is serialized as BSON object

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.6
    • Fix Version/s: 1.6.7
    • Component/s: pecl-mongo
    • Labels:
      None
    • # Replies:
      6
    • Last comment by Customer:
      true
    • Sprint:
      PHP Sprint 18

      Description

      Newer versions of the server require that the distinct command's query option be a BSON object, while previous versions allowed an array.

      {
      	"errmsg" : "exception: The query for the distinct command must be a document but was a Array",
      	"code" : 18511,
      	"ok" : 0
      }
      

      We should ensure that the PHP method's $query argument will serialize to an object by casting if necessary.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since reply:
                  4 years, 29 weeks, 6 days ago
                  Date of 1st Reply: