loopback-softdelete-mixin
loopback-softdelete-mixin copied to clipboard
_isDeleted is not saving properly in MySQL Database
I'm using MySQL for datasource. I set my deletedAt as deleted_at and _isDeleted as is_deleted. As far as I know, _isDeleted is a boolean type, or I should be expecting 0 or 1. Instead, it only save empty brackets {}
, regardless it has been deleted or not
I also cannot skip _isDeleted on create data, I should write the value of _isDeleted. It would be nice if I can skip this
Hi guys! I'm getting the same Validation Error when inserting a model.. seems like the default _isDeleted is not working, at least in PostgreSQL and MySQL
The MyModel
instance is not valid. Details: _isDeleted
can't be blank (value: undefined).
Thank you!!!
Hi guys! I have solved the problem adding the type String to the definition.
Model.defineProperty(_isDeleted, { type: String, required: true, default: false });