Good day. Quick question. Can you not limit the nu...
# orm-help
t
Good day. Quick question. Can you not limit the number of deletions on
deleteMany()
n
Hey Torrino 👋, Can you describe your use case and what you are trying to achieve? You can pass your condition in the where clause of
deleteMany
and the only records which match the condition will be deleted. If you don’t pass any arguments in deleteMany invocation, then all the records are deleted. Example of deleting all records. Example of deleting specific records.
t
My use case would be to for example delete only 5 records that match my condition from the
where
clause instead of all of them. Those 5 records would either be chosen randomly or in some sort of order (irrelevant in my case).