I have two tables: courses
and users
. These entities are associated by the @ManyToMany
annotation. In the course view (picture below) I have a purple button - after clicking this button, I want to get courses that are associated with users associated with this course (the one in the view). In other words I want to show other courses of this course participants(users).
The important thing about this view is that I have all the participant IDs in state(react state). I am sending it as the body of the request because I need to know user IDs to download users courses. I know that it's not good but I have no idea how I can avoid it