Deleting rows from multiple related tables

I have 3 tables related to each other and I am looking for the best way to delete rows from all of them with one action.

Should I use the native Glide actions or a 3rd party app like Make that works with the Glide API?

You can delete rows through a relation. If you have a table related to two other tables, you can set up a custom action with 3 action. The first two actions should delete rows in the related tables through the relation. Then the third action can delete the row in the main table.

I’m doing it exactly how you describe it. When I set the delete row action through relation I get a performance warning. What I’m asking is if this is the right way. I actually haven’t noticed slow loading etc.

That’s the way I would do it. Don’t know if a suitable alternative.

2 Likes

It’s good enough for me. Thanks a lot.

1 Like

What exactly does that warning say?
Are you deleting through a single or a multiple relation?

I’m using multiple relations.

Here’s the message I get:

Watch out!

This action can delete multiple rows from table “Companies”. Deleting many rows at once can take long to process and may hold up other actions from being processed.

Okay, that makes sense.
The warning comes because when you delete rows via a multiple relation, then ALL matching rows will be deleted. Which in some cases could be thousands of rows.
Is that actually your intention?
If you’re just wanting to delete a single row, then you should do it via a single relation.

That’s correct. I’m deleting multiple rows via multiple relations.

1 Like