Repository navigation
What's Changed
Fixed
- A write made to a persisted collection while
DefaultDataAdapterloads it from storage is no longer lost. Before this fix, the load replaced memory with whatreadAllreturned. An item inserted during the first load was missing fromfind/findOneuntil the next page reload, even though storage had it, and inserting the same id again succeeded. During afetchItemsFromStorage()reload, an update was reverted and a removed item came back. Now the result of every write made during a load is applied on top of what storage returned. This holds whether or not storage already had the write, and works the same way for the legacypersistenceoption. - A query that was registered before the
DefaultDataAdapterfinished loading the persisted items now updates once they are loaded. Until now it kept the result it had before the load — usually empty — until a later write touched a matching item, and afindOneorfind(...).fetch()with the same selector and options returned that stale result even afterready(). A reactive query run at startup, for instance in a component that renders before the storage answers, now sees the stored items without waiting forready()first.
Full Changelog: v2.0.0...v2.0.1