problem in retrieving the rows in case of composite key through hibernate -


i have faced issue many times couldn't find solution where.

my question how can retrieve tuple or row in database through hibernate call,

for example in relation student_course(sid,sname,cid,cname, duration) here sid , cid considered composite key.

please let me know solution.

thanks in adv, a.raghavendra

configure mapping file below,

<hibernate-mapping>     <class         name="com.example.studentcourse"         table="student_course">         <composite-id>           <key-many-to-one name="student" class="com.example.student" column="student_id"/>              <key-many-to-one name="course" class="com.example.course" column="course_id"/>          </composite-id>      ///other mappings elements 

in java, if retrive list of student course can details.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -