Joined: Thu Jan 05, 2006 4:09 pm Posts: 1
|
I have been searching for an answer to this question for some time and I must be missing something. In SQL it is painfully obvious, but I cannot figure out how to do this with hibernate.
Table A contains a primary key a_id
Table B contains a primary key b_id
Table C contains a primary key c_id
Table D is my link table with foreign keys back to the above tables. Coming into the application I know the primary key for A and for B.
How do I construct C?
In SQL it's select c_id from C where a_id = ? and b_id = ?
I am trying to refrain from using pure SQL if I can avoid it. If someone can point me in the right direction that would be great!
Regards.
|
|