Open nicojmb opened 3 months ago
i dont know this is correct answer or not. but i change of code on construction function inside Datatables.php like this
public function __construct($builder)
{
if (is_subclass_of($builder, '\CodeIgniter\BaseModel') && method_exists($builder, 'builder')) {
if ($builder->tempUseSoftDeletes) {
$builder->where($builder->table . '.' . $builder->deletedField, null);
}
$builder = $builder->builder();
}
$this->query = new DataTableQuery($builder);
$this->columnDefs = new DataTableColumnDefs($builder);
}
if i've a model with softDelete enabled, the query not skipts this items automatically.
https://codeigniter.com/user_guide/models/model.html#usesoftdeletes