Adds support for Long and Double mongodb types (fixes #1316) (#1470)

* Adds support for Long and Double mongodb types (fixes #1316)

* Use bigger numbers
This commit is contained in:
Florent Vilmart
2016-04-12 21:19:47 -04:00
parent af30f669cc
commit f312f81cbd
2 changed files with 20 additions and 0 deletions

View File

@@ -654,6 +654,14 @@ function untransformObject(schema, className, mongoObject, isNestedObject = fals
return Parse._encode(mongoObject);
}
if (mongoObject instanceof mongodb.Long) {
return mongoObject.toNumber();
}
if (mongoObject instanceof mongodb.Double) {
return mongoObject.value;
}
if (BytesCoder.isValidDatabaseObject(mongoObject)) {
return BytesCoder.databaseToJSON(mongoObject);
}