mesqueeb / vuex-easy-firestore

Easy coupling of firestore and a vuex module. 2-way sync with 0 boilerplate!
https://mesqueeb.github.io/vuex-easy-firestore
MIT License
233 stars 28 forks source link

Guard 'id' will still add 'id' on update #357

Open FricoRico opened 3 years ago

FricoRico commented 3 years ago

Hi Luca! Thanks for your development and commitment to vuex-easy-firestore.

As pointed out in another ticket (#83) some fields are automatically when patching data. You've implemented guards and fillables to have more control over this behaviour.

I've added guard: ['id', 'updated_at', 'updated_by'] to my modules. Indeed upon updating the updated_at and updated_by will no longer be added. But it seems id is still added by default. Is this a bug?

louisameline commented 3 years ago

Hello, that's how it works for now, as the id is used somewhere at some point. I managed to change this in a fork though, it wasn't too hard.