Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6185

verify assertion on attempt to include a subfield within a non object array element

    XMLWordPrintableJSON

Details

    • ALL

    Description

      Observed behavior: Attempt to include the field 'a.b' from document

      { a:[ 1 ] }

      triggers a verify assertion.
      Expected behavior: The query projection implementation omits the array value in this case and does not assert.

      c = db.c;
      c.drop();
       
      c.save( { a:[ 1 ] } );
       
      printjson( c.aggregate( { $project:{ 'a.b':1 } } ) );
      printjson( c.find( {}, { 'a.b':1 } ).toArray() );

      Attachments

        Activity

          People

            matt.dannenberg Matt Dannenberg
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: