Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,当在 Meteor 中尝试简单collection.insert({ owner: Meteor.userId(), length:3 });时,它由客户端执行,但被服务器撤销(或在进程中,相同collection.update)目前我将该字段重命名length为len,瞧,它可以工作......但现在我不符合 GridFS 规范说:'fs.files.length'(项目:collectionfs.meteor.com)
collection.insert({ owner: Meteor.userId(), length:3 });
collection.update
length
len
任何人?
length这是因为在 Meteor 中广泛使用的 Underscore 库中的迭代函数通过查看它是否具有数字属性来决定它们是迭代数组还是对象。我认为这里的特定实例livedata/livedata_server.js在set函数中(第 515 行左右):它解释attributes为一个数组,然后找不到任何实际属性。
livedata/livedata_server.js
set
attributes
也许我们需要完全停止在 Meteor 中使用 _.each。