Laravel-mongodb: SoftDelete does not work with all query

Created on 23 Apr 2015  路  3Comments  路  Source: jenssegers/laravel-mongodb

Hello,

If I'm not mistaken, SoftDelete with deleted_at value does not work with all query. All items returned ...

I use "use SoftDeletes" in my model. And delete method to remove item.

Most helpful comment

i found out the issue. this happens when you use SoftDeletes trait from Laravel, not from this library. so it should be from Jenssegers\Mongodb\Eloquent\SoftDeletes.

All 3 comments

any updates ? Were you able to solve your issue?

one thing i noticed, by watching the logs (query), it uses the alias or collection name together with the deleted_at, which generally a non-existent field (e.g. my_collection.deleted_at vs just deleted_at) in that collection

i found out the issue. this happens when you use SoftDeletes trait from Laravel, not from this library. so it should be from Jenssegers\Mongodb\Eloquent\SoftDeletes.

Was this page helpful?
0 / 5 - 0 ratings