I have a question about this example.
The mapping shows that there is a column ITEM_IMAGE_ID, to store the primary key of the table. But, there isn't a property in the class to store this value. Is this right? How can I refer to an item of this collection, without knowing the pk value in the class?
Code:
<idbag name="images" lazy="true" table="ITEM_IMAGE">
<collection-id type="long" column="ITEM_IMAGE_ID">
<generator class="sequence"/>
</collection-id>
<key column="ITEM_ID"/>
<element type="string" column="FILENAME" not-null="true"/>
</idbag>