mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Allows document _id to be generated on driver side for return
This commit is contained in:
1 parent
d26afa40b5
commit
cf5a3d2f63
2 files changed
+3
-1
No files matched your search
Generated
+1
-1
@@ -2257,5 +2257,5 @@
|
||||
"ext-mongodb": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
@@ -376,6 +376,8 @@ class MongoClient
|
||||
$docObj->{$key} = $value;
|
||||
}
|
||||
|
||||
$docObj->_id ??= new BSON\ObjectId();
|
||||
|
||||
$this->query(array_merge([
|
||||
MongoCommand::INSERT => $collection,
|
||||
'documents' => [$docObj],
|
||||
|
||||
Reference in new issue
Block a user