Closed thnam1410 closed 3 months ago
Also, thank you for this library it is extremely helpful.
@thnam1410 You can achieve this behavior with the current state of this library. This is a valid workaround:
prisma.findMany({
where: {
archivedAt: {}
}
});
I have tested this with nested relations, and findFirst
calls and all of them work.
But I am not sure how supported/stable this behavior is in Prisma. As of 5.6.0, this is a valid and working solution.
Hi @thnam1410,
Thanks for raising this, I definitely do want to support querying both soft-deleted and non-deleted rows soon, I'll hopefully have time to get onto it over the Christmas period. It will likely have an API similar to your suggestion; I also want it to work in general (includes, selects, Typescript, etc).
@Hackder thank you for the workaround!
I'm really happy you are both finding the library helpful! Thank you for the kind words 🙏
How is it going on this?
Hi, first of all, thanks for your amazing library.
I'm facing problem with query table with non-deleted and deleted records.
I did try query like:
This is my table structure:
I feel like this kind using "OR" is not convenient if we have more query conditions, do we have method or plan for a query that can include the deleted records? For example "TypeORM"
Maybe the method for this library could be: