0
我剛纔注意到,每當使用預定義變量MongoDB中保存任何數據類型從Number和Boolean改爲字符串流星蒙戈保存/插入數字轉換成字符串
Orders = new Mongo.Collection("Orders");
Orders.update({_id:"12345"},{$set:{price:5.5}) //this works
var price = {price: 5.5};
Orders.update({_id:"12345"},{$set:price}); //this is not working anymore in the mongo collection price is saved as String "5.5" not as a number, same goes for Boolean values
誰能幫助我在哪最近怎麼樣?更改整個應用程序以使用第一種方法並不是一種解決方案,因爲我的代碼生成了數千次更新,這些更新以前完美運行。
你能展示你是如何定義你的訂單模式流星? –
這是否也發生在一個新的應用程序?如果不是,你使用了什麼軟件包? – MasterAM