-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Description
Environment
With Vue 2.7.16 and pinia-orm 1.7.2
Reproduction
Not working with pinia-orm 1.7.2 and vue 2: https://stackblitz.com/edit/vue2-vite-starter-yrebbd
Working with pinia-orm 1.6.7 and vue 2: https://stackblitz.com/edit/vue2-vite-starter-a2jqrw
Working with pinia-orm 1.7.2 and vue 3: https://stackblitz.com/edit/vue2-vite-starter-jn2ym2
Describe the bug
When using Vue 2, Object.assign is breaking reactivity. When an entity is inserted into a repository, the getter using the repository are not updated.
Additional context
It is possible to verify that the pinia store state is changed via https://pinia.vuejs.org/core-concepts/state.html#Subscribing-to-the-state With Vue 2, we can see that the inner store state is not properly updated via the Object.assign used in pinia-orm 1.7
Logs
No response
CodeDredd