Deleting Many-to-many Relationships

1
Hello, I’m currently working on an app that matches college students with high school students for tutoring. In my domain model, I have a “Tutor” entity associated to a “Subject” entity through a many-to-many relationship. The way this will work is that tutors will select the subject they’d like to tutor in, and since they can tutor for more than one subject, they’ll be able to select several “subject” objects and create associations with it. They way I’m doing this is that when a tutor clicks a “select subject” button, a microflow will be triggered that associates the current tutor object to the selected subject object. The image below explains this.   So far so good, but the problem comes when I try to delete the relationship. I have a conditional-visibility “Deselect subject” button that is meant to undo that relationship and delete it. I haven’t been able to figure out how to do this without deleting all existing relationships (setting the association to “empty” would delete all others associations as well, and that’s not what I want). Any suggestions/ideas on how to do this? Or maybe a workaround to the problem in case there is no way to do this exactly? It’s my first time working with many-to-many relationships, so any guidance I can get I will highly appreciate. Thanks!
asked
1 answers
3

Hi Benjamin,

This can be done the same way you add them.

But use the option remove

answered