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

Allow JSON Parser to support additional fields when parsing DBRefs

    • ALL

      This works:

      $ echo '{ "_id" : { "$oid" : "5062d20310db79406d000059" }, "parent" : { "$ref" : "box", "$id" : { "$oid" : "5062d1d810db799135000005" } } }' | mongoimport -d test -c testcoll 
      connected to: 127.0.0.1
      Mon Sep 16 11:26:01.811 imported 1 objects
      

      This does not:

      $ echo '{ "_id" : { "$oid" : "5062d20310db79406d000059" }, "parent" : { "$ref" : "box", "$id" : { "$oid" : "5062d1d810db799135000005" }, "_doctrine_class_name" : "Box" } }' | mongoimport -d test -c testcoll 
      connected to: 127.0.0.1
      Mon Sep 16 11:26:29.705 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Expecting '}' or ',': offset:127
      Mon Sep 16 11:26:29.705 
      Mon Sep 16 11:26:29.705 check 0 0
      Mon Sep 16 11:26:29.705 imported 0 objects
      Mon Sep 16 11:26:29.705 ERROR: encountered 1 error(s)
      

      Notice the extra "_doctrine_class_name" field in the DBRef.
      If I use the MongoDB 2.2 mongoimport, then it works.

      There's been an issue with same summary for 1.3, but with different content.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            andor.toth@sanomamedia.hu Andor Tóth
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: