diff --git a/core/MY_Model.php b/core/MY_Model.php index 05add98..293c810 100644 --- a/core/MY_Model.php +++ b/core/MY_Model.php @@ -210,6 +210,15 @@ public function insert($data, $skip_validation = FALSE) { $data = $this->validate($data); } + + /* Auto assign ZERO(0) to soft delete key if not specified by user*/ + if ($this->soft_delete) + { + if (!isset($data[$this->soft_delete_key])) + { + $data[$this->soft_delete_key] = 0; + } + } if ($data !== FALSE) {