I have a problem here....I have 2 tables, STUDENTS with studentId column, but its not primary key and I have a one more table GAMES with auto generated primary key and studentId and here also studentId is not primary key. These tables do not have any relation in db, but I need to fetch results of games for a student when I fetch a student record, ie one student gets N number of games when fetched by using fetchtype as eager. but the problem is that there is no relation.
My doubt is that, can we fetch the details of the games of a student by explicetly putting a one to many mapping in the hbm file or may be by configering by annotations.
Yes, my master! Here is the tiny ad you asked for:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps