Welcome Guest, Not a member yet? Register   Sign In
Soft delete doesn't work with like?
#4

I don't think it's a bug, it's a misunderstanding about which methods take soft deletes into consideration and which class certain methods actually belong to.

A call like

PHP Code:
$model->where("body"$q); 

Looks like the Model class has a method called where. It does not. What is really being called is a Builder instance.

On the other hand

PHP Code:
$model->find($id); 

actually is making a call to a method in the Model class.  It is only a short list of Model methods that consider soft delete status. In terms of read operations it's find(), findAll(), and first() and that is all. There are no Builder methods that consider soft deletes.
Reply


Messages In This Thread
Soft delete doesn't work with like? - by edica - 10-29-2019, 07:51 AM
RE: Soft delete doesn't work with like? - by dave friend - 11-01-2019, 08:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB