Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2646

DateTimeOffsetSerializer should be forgiving of the actual numeric types it encounters during deserialization

    • Fully Compatible

      I already report this in Shell Section, but as it only affects the `DateTimeOffset` i though i need to tell it in driver section too.

       

      I have data imported using Mongo C# Driver, and at some point i noticed my link are generating certification error since they are not using SSL, so i had to update them somehow, i decide to add both version of links, so i had to update my data in place somehow, and the only way i could find was not update method, but looping through, modification, and save...

      In this process i didn't modified any data, or convert them to JSON, i just modified the required field, then when i start the project, i faced internal error for those updated users...

      The Int32 field somehow turned to Double, yet the Int64 was intact... i modified object created by DateTimeOffset, it creates an array with two item, an Int64, and an Int32....

      But the data type got messed with.

      db.humanResource.user.find({
      	ProfilePictures: {
      		$exists: true
      	},
      	ProfilePictures: {
      		$ne: null
      	}
      }).forEach(function (e, i) {
      	for(var i=0; i< e.ProfilePictures.length; i++){
      		 e.ProfilePictures[i].CloudinarySecureUrl = updateHttpToHttps(e.ProfilePictures[i].CloudinaryUrl);
      	}
      	db.humanResource.user.save(e);
      })

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            deadmann Hassan Faghihi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: