mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
How to remove all associations between entities using QueryBuilder #6721
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Aerendir on GitHub (May 15, 2021).
Forgive me if I use the issues to get support, but on StackOverflow no one replied me :(
I have an entity
Transaction.It has two properties to maintain some self
many-to-manybidirectional associations:How to remove all the associations using the QueryBuilder?
I need to do something like this:
But this obviously doesn't work because what I'm actually deleting is the
Transactionand not the relation.And in fact, I get this error in return:
How to remove all the relations using the QueryBuilder?