I have two classes with composite PKs. The PK classes are annotated with @Embeddable and the IDs with @EmbeddedId.
One class (table) has a composite key made up of a student primary key and a test primary key. The class is called something very original, like Student_Test. The PK is called ID. The sudent PK is a code, say his dob concatenated with his initials (if there are two identical ones, concat 2 to the second one).
If I want to get all instances of Sudent_Test for a particular student, do I do this?
Query q = manager.createQuery("select st from Student_Test st where st.ID.student = :student")