feat: support ObjectID on the other fields#15
feat: support ObjectID on the other fields#15harry-73 wants to merge 10 commits intojamauro:mainfrom
Conversation
|
Hi, is there a chance to have this PR merged? |
|
I'm not opposed to the feature generally. But I don't think this approach is the right solution because it won't work for other nested data. I also think that generally most Meteor devs don't use |
|
Thanks for your reply. You're right it based of my usecase (referencing others documents from other collections ar top level). |
|
Hmm, I don't love the idea of adding multiple configs for this. One idea would be to apply it if the collection is known to have Maybe there is an even simpler solution. I haven't looked at how previous indexeddb solutions dealt with it. Let me know if you come up with a simpler solution. |
|
I did a few tests. It seems that using |
I think it will not work as you can have collection without |
|
I did not test with the |
Fix Error: UnknownError: Attempt to delete range from database without an in-progress transaction IDBObjectStore.clear() takes no arguments. Passing the extra parameter 'names' raises an error on Safari/WebKit/Ios
pauseObservers/resumeObservers patch and restore store.endUpdate for every store, but some entries in Meteor.connection._stores (from queued method collection names) don’t have endUpdate. Restoring store.endUpdate = store._originalEnd when _originalEnd was undefined left endUpdate non-callable and triggered the error. Fix: Only patch/restore when the method exists: in pauseObservers, do it only if typeof store.endUpdate === 'function'; in resumeObservers, only if typeof store._originalEnd === 'function'. Stores without endUpdate are left unchanged so the TypeError no longer occurs.
fix: e.endUpdate is not a function
Fix clearAll function to use correct parameters
indexedDB does not store ObjectID as ObjectID. So when the package loads the data from indexedDB to minimongo, the original ObjectID is not seemed as ObjectID but plain Object and it creates issue with queries on server side.