收藏
回答

云开发数据库的watch监听部分功能失效?

开发者工具版本号:1.06.2409140,电脑操作系统:Windows11。

以前使用

this._globalChatListenerInstance = db.collection('chat_sessions_v2')

            .where({ participants: _.in([myUserId]) })

            .watch({

                onChange: (snapshot) => {

是完全没问题的,现在使用这个in判断,会无法监听数据库的更新,只能监听到init。而如果使用等值匹配,比如

.where({session_id: "073a77ac680655aa0197612c1ec68e906a580dc9681a102a0281e3b17ad45c46"})

则不存在问题。


回答关注问题邀请回答
收藏
登录 后发表内容