master detail or including related records from different collections
master detail relationship reg ..
I have two collections , a master and a child , much like student and class . Each class can have multiple students . I would like to get a list of all the students in a class by their first name.
With a pointer column in class collection that points to student collection . I can include the student when i retrieve the class collection .Seems like this is working off of the "id" column . which itself is unique per record . I would like to relate them based on another column other than "id".
What is the best approach ? any examples would be greatly appreciated.
Thanks