Open Bhanu220290 opened 4 years ago
@Bhanu220290 I think this is due to a choice that was made in the javascript integration. Until a longer term fix is available I think you can fix it by making a small change to monstache. Here you would change the line to remove the call to restoreIds
:
fc.query = deepExportValue(q)
Alternatively, if you use a golang plugin instead of javascript you can avoid this problem.
@rwynn Thank you for your prompt reply and for your solution.
For ex- Suppose I have 2 database ( db1 & db 2) and in db1 i have one collection called col1 inside this collection we have following fields db1.col1 {_id:'string', //which looks like mongodb id because we migrated it from another mongodb server and pushed into our db name :'string', category:{ id:'string' //this id is associated with another db's collection ie db2.col2 (which is also looks like mongodb id) } } //db2.col2 {_id:'string',//which looks like mongodb id because we migrated it from another mongodb server and pushed into our db name:'string', age:'string' }
I wrote one transformation script that will fetch the data from another db's collection ie(db2.col2) and extend the response with the respective document but the script is not able to get the data from another db ie db2 because when we try to fetch the data, the monstache converts it's category.id to mongodb objectid, due to this we got empty response as a result but if we update our mongodb collection document id to objectId then it's working but that solution is not feasible for me to update my 10K records. so please provide me a solution of this problem.