Closed karger closed 4 years ago
I believe this should be fixed now (in the dev version—the one in the src
folder). Feel free to reopen the issue if I'm wrong.
thanks dmitry. i've modified my code to work around the issue, but i'll try to change it back later to see if it works.
On 6/16/2020 5:15 PM, Dmitry Sharabin wrote:
I believe this should be fixed now (in the dev version—the one in the |src| folder). Feel free to reopen the issue if I'm wrong.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DmitrySharabin/mavo-firebase-firestore/issues/15#issuecomment-645016013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWSXVJKSYIQOGUC4TIEPTRW7OHXANCNFSM4N7VKDEQ.
I've got an app that is modifying its mv-storage to change from one (firebase) url to a different one with a different collection name. This is not working. It appears this is because too little is being done on a call to
update
. The update method of the plugin is called (at least) whenever themv-storage
attribute changes. And theupdate
method does parse the new url and then updates attributes of the plugin object based on it. However, the database objectthis.db
is created only when the constructor is called, and is not updated by theupdate
method. Thus, if the newmv-storage
uses a differentcollection
than the old one, then the database object will continue to reference the old collection so will not have the proper path for whatever newfilename
is being stored.So to fix this,
this.db
needs to be updated ifthis.collection
changes. And this may require other changes---for example, if a realtime snapshot listener is active on the old db, it has to be replaced with one on the new db.