You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
_id can be user defined for data/index restore operations
Actual/Current behavior
ignores old _id and generates new _id every time
(I am new to the api, so there may be a reason for this I haven't read about yet)
Steps to reproduce the actual/current behavior
varkeystone=require('keystone');varTypes=keystone.Field.Types;consterrors=require("errors");// ...//json object based on default User Model entryvarbackupAcc=JSON.parse('{"_id":"5d3f62bca9108026a732c9fa","logins":0,"password":"newTest","email":"[email protected]","__v":0,"isAdmin":false,"name":{"last":"Sad","first":"Panda"}}');//// backupAcc['_id']='ObjectId("'+ backupAcc['_id']+'")';backupAcc['_id']=keystone.mongoose.Types.ObjectId(backupAcc['_id']);//varpayload={};payload['User']=Array();payload['User'][0]=backupAcc;//keystone.createItems(payload,{verbose: true},function(err,stats){//wrong '_id' generated upon insert, delete, and insert again
Environment
Keystone 4
Node.js v12.6.0
The text was updated successfully, but these errors were encountered:
Expected behavior
_id can be user defined for data/index restore operations
Actual/Current behavior
ignores old _id and generates new _id every time
(I am new to the api, so there may be a reason for this I haven't read about yet)
Steps to reproduce the actual/current behavior
Environment
Keystone 4
Node.js v12.6.0
The text was updated successfully, but these errors were encountered: