Releases: vuex-orm/plugin-soft-delete
Releases · vuex-orm/plugin-soft-delete
v1.2.1
v1.2.0
New Features
A brand new episode of the Vuex ORM Soft Delete plugin.
While the architecture and codebase has undergone a major transplant, the existing scope is left intact to serve existing users.
- Global and model level option configurations.
softDeleteConfigcan be defined on models to override global options/defaults.
- Composite Primary Key support.
- Single and batch delete models.
- Restore deleted models.
- Model state indicator through
instance.$trashed().- A unified method edition of
instance.$isDeletedsince it's an interchangeable property.
- A unified method edition of
- User-defined mutator for the
keyattribute.- Intersect the date value passed as argument or simply return any value to be stored.
- Global and per-model configuration.
- Typescript support.
- Comprehensive coverage tests.
Improvements
keyattribute usesDate.now()instead ofnew Date.- Enables better conditional treatment over string representation and prevents an empty object persisting to the store.
- Deleting instance updates reference.
- Removes the habit of fetching the same record after it's trashed.
- Allows forceful hydration after deleting and restoring.
- Eloquent-esque naming conventions for query builder.
withTrashedandonlyTrashedare consistent with other ORM's.
- Fixes model serializing that'd ceased functioning since it changed in @vuex-orm/core.
- Compatible with recent releases of @vuex-orm/core.
- Better alignment with @vuex-orm/core codebase and API.
- Utilises some existing typings from @vuex-orm/core for consistency and support.
Deprecations
- Query chain method
onlyTrashedsupersedestrashed. - Model instance method
$softDeletesupersedessoftDelete.
All deprecations come with warnings outside production mode.