I have three columns in the database:
DISC with columns ID and TITLE
SONG with columns ID and TITLE
DISC_SONG with columns DISC_ID, SONG_ID and SEQUENCE
In my mapping file I have the following lines:
Code:
<set name="songs" table="disc_song" order-by="sequence asc">
<key column="disc_id" />
<many-to-many column="song_id" class="com.huijzer.musicweb.Song" />
</set>
When I retrieve the relevant song objects with the following code:
Code:
Set songs = myDisc.getSongs();
I would like the returned Song objects to include the SEQUENCE column so I can use
Code:
mySong.getSequence()
to return the sequence column for that particular Disc.
Is this possible?
Thanks in advance for any help!
Arjan Huijzer