Closed flight9 closed 4 years ago
I'm sorry that you can't upgrade to 2.0. That really puts you in a tough situation because this is definitely fixed in 2.0 and now 3.0. I'll at least give you some guidance. The magic to fix this bug all lies in the new mergeWithAccessors
utility that came with 2.0+. You can find it here: https://github.com/feathersjs-ecosystem/feathers-vuex/blob/master/src/utils.ts#L409
If you make a pull request that makes sure that all database responses that modify store data go through that function, it should maintain the Vue reactivity of the model instances instead of overwriting the records with plain objects.
So you'll want to start by copying that into the code for 1.7. I believe I even managed to figure out tests for this. The vue test-utils are pretty fickle for me, meaning they rarely work at all for me, so I work around them as best as I can.
I'm going to go ahead and close this, since I cannot get to it any time soon. Please reopen if you plan on working on it.
Steps to reproduce
On feathers server side, make two models:
On feathres vuex client side, declare relation like what examples do in store/index.js
Expected behavior
Every time, the subdocuments of result are with FeathersVuex
Actual behavior
The 1st time, the subdocuments of result are with FeathersVuex(see pic):
But from the 2nd time, the subdocuments of result are without FeathersVuex(see pic):
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 1.7.0 - 1.7.2
NodeJS version: 8.9.3
Client Version: quasar v.0.17.20