Hi all,
i didn't find any solution of my hibernate trouble since the last 3 days. How can i represente that SQL code in hibernate mapping and java code :
create table bundles(idbun not null primary key, etc...)
create table files(idfile not null primary key, etc...)
create table fileperbundle(idbun_fk not null, idfile_fk not null, primary key (idbun_fk, idfile_fk) foreign key idbun references bundles(idbun_fk), etc...)
i think i have to use the composite-id hibernate attribute. i did that :
<class name="Fileperbundle" table="fileperbundle>
<composite-id name="id" class=? (i don't know to put here)>
<key-many-to-one name="idBunFK" class="Bundle" column="idbun" />
<key-many-to-one name="idFileFK" class="File" column="idfile" />
</composite-id>
</class>
is this mapping correct ? and can somebody show me what is the java code of the Fileperbundle class.
Thanks a lot (and sorry for my english)
--
kurk
|