Replies: 1 comment 2 replies
-
Oh that is a bit awkward and I hadn't thought of this case when I coded it that way. The whole deleted_at inclusion/exclusion thing is a bit frustrating and bolt-on. Definitely seems like it's going to find that and remove it "for you" haha. It may actually make more sense to delete from the end instead of the start given that most of the time it will be appended on to at the end of the query mods you've added. |
Beta Was this translation helpful? Give feedback.
2 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hello,
I have a use case where I need to retrieve all deleted records or some records which have been deleted past certain day. E.q.
With models I'd write something like this:
Considering my models are generated with soft-deletes enabled, the
deleted_at IS NULL
mod is appended at the end of stack. Before the final bind.I think there is an issue with how
WithDeleted
works viaremoveSoftDeleteWhere
by removing the first instance ofdeleted_at
which breaks theOR
in my example. Not sure if this is intended and if there is another way to write this?Thanks
Lyubo
Beta Was this translation helpful? Give feedback.
All reactions