Skip to content

Commit f4beee7

Browse files
committed
For MongoDB connector, support for Extended JSON in order to support $numberDecimal and $date type.
1 parent 525afda commit f4beee7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/src/main/java/org/cerberus/core/service/mongodb/impl/MongodbService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public AnswerItem<AppService> callMONGODB(String servicePath, String requestStri
175175
maxFetch = maxSecurityFetch;
176176
}
177177

178-
try (MongoCursor<Document> cursor = collection.find(BasicDBObject.parse(requestString)).limit(maxFetch)
178+
try (MongoCursor<Document> cursor = collection.find(Document.parse(requestString)).limit(maxFetch)
179179
.iterator()) {
180180
int i = 0;
181181
while (cursor.hasNext() && i < 5) {
@@ -195,7 +195,7 @@ public AnswerItem<AppService> callMONGODB(String servicePath, String requestStri
195195

196196
case AppService.METHOD_MONGODBUPDATEONE:
197197
if ((StringUtil.isNotEmptyOrNULLString(requestString)) && (StringUtil.isNotEmptyOrNULLString(requestExtra1String))) {
198-
UpdateResult resultUpdate = collection.updateOne(BasicDBObject.parse(requestString), BasicDBObject.parse(requestExtra1String));
198+
UpdateResult resultUpdate = collection.updateOne(Document.parse(requestString), Document.parse(requestExtra1String));
199199
LOG.debug("Results updated.");
200200
// mongoDBResultArray.put(new JSONObject(resultUpdate.getUpsertedId()));
201201
// LOG.debug(mongoDBResultArray);

0 commit comments

Comments
 (0)