Unable to understand!

I want to create an app where teachers can add, remove, list, and update students. To accomplish this, I have set up a collection named ‘Student’ and defined a role named ‘Teacher’. Upon registering, new users will automatically be assigned to the Teacher role.

Furthermore, I’ve established a relationship between users and the Student collection.
I expect, teachers (users) will have the ability to add, fetch, and manage students seamlessly within the app.

I’m encountering an issue where I’m unable to fetch only the students associated with a particular teacher. Instead, the app is retrieving all students regardless of their assigned teacher.