Skip to content

Commit

Permalink
fix(#12): flush is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDredd committed Jun 29, 2022
1 parent fe94da8 commit c71e2c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/nuxt/playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const users = userRepo.save([{
]
}])
onMounted(() => {
console.log('ToDos')
console.log(userRepo.with('todos').get())
userRepo.flush();
console.log(userRepo.all());
})
// console.log(users)
Expand Down
3 changes: 3 additions & 0 deletions packages/pinia-orm/src/composables/useStoreActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ export function useStoreActions(): StoreActions<any> {

this.data = data
},
flush(): void {
this.data = []
},
}
}

0 comments on commit c71e2c8

Please sign in to comment.