Skip to content

Commit 24c600f

Browse files
committed
remove this
using get_many or get_many_by produce duplicate `deleted` = 0 if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) { $this->_database->where($this->soft_delete_key, (bool)$this->_temporary_only_deleted); } since get_all already implement this method to prevent duplidate `delted` = 0 in sql query.
1 parent 6e63f59 commit 24c600f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

core/MY_Model.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ public function get_by()
156156
*/
157157
public function get_many($values)
158158
{
159-
if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE)
160-
{
161-
$this->_database->where($this->soft_delete_key, (bool)$this->_temporary_only_deleted);
162-
}
163-
164159
$this->_database->where_in($this->primary_key, $values);
165160

166161
return $this->get_all();
@@ -172,12 +167,7 @@ public function get_many($values)
172167
public function get_many_by()
173168
{
174169
$where = func_get_args();
175-
176-
if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE)
177-
{
178-
$this->_database->where($this->soft_delete_key, (bool)$this->_temporary_only_deleted);
179-
}
180-
170+
181171
$this->_set_where($where);
182172

183173
return $this->get_all();

0 commit comments

Comments
 (0)