As steve said, the LineItem, which corresponds to your "Follows" is an entity and should be mapped as such in your mapping file(s). If I understand your problem domain correctly, your "Follows" object should look something like:
Code:
public class Follows {
private int level;
private Student student;
private Course course;
// Appropriate constructors, bean methods, etc.
}
See
Bidirectional associations in Chapter 7 of the reference guide for help on making the single-valued end of the relationship (the student and/or course). If you're having trouble with the Collections in Student and/or Course, look toward the beginning of Chapter 7.
Once you get it mapped, finding the level is a simple matter of loading the appropriate Follows object and reading the level property.