derbyjs / racer

Realtime model synchronization engine for Node.js
1.19k stars 117 forks source link

Path queries do not update when the underlying path array changes #223

Closed psirenny closed 5 months ago

balek commented 9 years ago

Problem affects all versions since alpha33. alpha32 is OK.

aliksend commented 9 years ago

There is a way to find a problem

balek commented 9 years ago

Actually commit history doesn't help, as Model/Query.js was almost rewritten. So I have compared alpha32 with the latest version. I've found two problems:

  1. https://github.com/derbyjs/racer/commit/b0261be625b409d54dc4b176bcd5727cc5f44afe#diff-1e28cc9447f035340bf597ac2ca4e2a2L11 I couldn't find a reason for the change in this line. This part of code stops working. I think map should be model.root._queries.map as it was.
  2. There is absolutely no place where documents with added ids would be fetched and subscribed. Alpha32 has subscribeDoc and unsubscribeDoc calls. The latest version has only maybeUnloadDoc. I couldn't solve this by myself and leave this problem for maintainers.=) @nateps please help. This is a necessary function!
craigbeck commented 5 months ago

Thanks for your contributing your issue.

We have recently been actively updating the Derby and Racer packages, and both repos are now in Typescript and published with types on npm. As we have quite a few old issues open we have made the decision to close out of date issues.

If this issue still matters to you we encourage reproducing against the current versions of the repo and opening a new issue.