Uploaded image for project: 'Perl Driver'
  1. Perl Driver
  2. PERL-553

Inserting Tie::IxHash with _id causes duplicate _id fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.708.3.0
    • Component/s: Perl driver
    • Labels:
      None
    • Environment:
      Perl driver 0.708.2.0 and MongoDB 3.0.4
    • Story Points:
      1

      Description

      Minimal repro:

      use strict;
      use warnings;
      use Tie::IxHash;
      use MongoDB;
      my $client     = MongoDB::MongoClient->new;
      my $database   = $client->get_database('test');
      my $collection = $database->get_collection('duptest');
      $collection->drop;
      $collection->insert(Tie::IxHash->new( _id => 1 ));
      

      Using the mongo shell, the resulting document appears like this:

      { "_id" : NumberLong(1), "_id" : NumberLong(1) }
      

      N.B. This does *not* occur with the latest v1 beta.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                david.golden David Golden
                Reporter:
                david.golden David Golden
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: