I read that deleteMany with cascade is not support...
# orm-help
a
I read that deleteMany with cascade is not supported currently but is there another way to achieve the cascade effect without using the deleteMany call? Currently I’m trying to fetch all the elements I wish to delete through a prisma query, then loop through them and perform a single delete on each one however I get this message after the first one deletes:
Copy code
[GraphQL error]: Message: Whoops. Looks like an internal server error.
n
What does the internal server error read?
It is being logged.
a
Copy code
Caused by: java.sql.SQLException: Deadlock found when trying to get lock; try restarting transaction
Query is: DELETE FROM `default@default`.`_RelayId` WHERE `id` IN ( (SELECT `A`  FROM (SELECT * FROM `default@default`.`_AssigneesInSpecialRule`) PATHQUERY  WHERE   `B` IN ( (SELECT `B`  FROM (SELECT * FROM `default@default`.`_SpecialRulesInPayer`) PATHQUERY  WHERE   `A` IN ( (SELECT `B`  FROM (SELECT * FROM `default@default`.`_PayersInBe`) PATHQUERY  WHERE   `A` IN ( (SELECT `A`  FROM (SELECT * FROM `default@default`.`_BesInConfiguration`) PATHQUERY  WHERE   `B` IN ( ? )) )) )) )) ), parameters ['cjmdugxiv003o09282wk00o5o']
        at org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:146)
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:217)
        at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:218)
        ... 55 more
@nilan looks like a deadlock
n