简体   繁体   English

流星ShareJS文档更新/快照清除了其他值

[英]Meteor ShareJS document update/snapshot wipes out other values

I'm using the Meteor ShareJS package for concurrent editing. 我正在使用Meteor ShareJS包进行并发编辑。 I am trying to write additional values to items in the docs collection. 我正在尝试将其他值写入docs集合中的项目。 Things like titles, etc. It seems to work until a document is edited in the ACE editor to the point where a new snapshot is created. 诸如标题等之类的东西似乎一直有效,直到在ACE编辑器中将文档编辑到创建新快照的位置为止。 At this point all of the extra fields are cleared. 此时,将清除所有其他字段。

I'm the maintainer of the meteor-sharejs package. 我是meteor-sharejs软件包的维护者。

The recommended way to use the package is to keep all metadata in a Meteor Collection, and not in the ShareJS docs collection. 建议使用该软件包的方式是将所有元数据保留在Meteor集合中,而不是在ShareJS docs集合中。 This is because they are basically separate software stacks that do not talk to each other. 这是因为它们基本上是彼此不交谈的单独软件堆栈。 It's also possible that you are using a docs collection for your documents which is the same name as the ShareJS collection; 也有可能在docs中使用了一个docs集合,该集合与ShareJS集合同名; then they would be overwriting each other. 那么他们会互相覆盖。

If you'd like to see ShareJS not head in the direction of being compatible only with Derby, I'd encourage you to chip in at https://github.com/share/ShareJS/issues/277 . 如果您希望ShareJS不再只与Derby兼容,我建议您访问https://github.com/share/ShareJS/issues/277

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM