@foxify/odin
Advanced tools
Comparing version 0.1.0-beta.11 to 0.1.0-beta.12
@@ -15,2 +15,6 @@ # Changelog | ||
## [v0.1.0-beta.12](https://github.com/foxifyjs/odin/releases/tag/v0.1.0-beta.12) - *(2018-08-21)* | ||
- :beetle: `Model` safe deleting bug fix | ||
## [v0.1.0-beta.11](https://github.com/foxifyjs/odin/releases/tag/v0.1.0-beta.11) - *(2018-08-21)* | ||
@@ -17,0 +21,0 @@ |
@@ -164,3 +164,5 @@ /* | ||
delete(t) { | ||
return this._apply_trashed_options(), super.delete(t); | ||
return this._apply_trashed_options(), this._model.softDelete ? super.update({ | ||
[this._model.DELETED_AT]: new Date() | ||
}, t) : super.delete(t); | ||
} | ||
@@ -167,0 +169,0 @@ restore(t) { |
@@ -173,5 +173,3 @@ /* | ||
let r = this.query(); | ||
return r = Array.isArray(t) ? r.whereIn("id", t) : r.where("id", t), this.softDelete ? r.update({ | ||
[this.DELETED_AT]: new Date() | ||
}, e) : r.delete(e); | ||
return (r = Array.isArray(t) ? r.whereIn("id", t) : r.where("id", t)).delete(e); | ||
} | ||
@@ -178,0 +176,0 @@ restore(e) { |
{ | ||
"name": "@foxify/odin", | ||
"version": "0.1.0-beta.11", | ||
"version": "0.1.0-beta.12", | ||
"description": "Active Record Model", | ||
@@ -5,0 +5,0 @@ "author": "Ardalan Amini <ardalanamini22@gmail.com> [https://github.com/ardalanamini]", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192715