Hello,
I've got a question regarding the example from chapter 7.2 of the documentation:
<set name="someNames" table="some_names" lazy="true">
<key column="id"/>
<composite-element class="eg.Name"> <!-- class attribute required -->
<property name="initial"/>
<property name="first"/>
<property name="last"/>
</composite-element>
</set>
In this case "id" is the foreignkey to the enclosing table. Am I correct?
Is it possible that table 'some_names' has its own synthetized primary key generated by Hibernate (let's call it "name_id", Type "long")? How would this Hibernate mapping look like? Or is it not possible that a table of depending objects has such a primary key, i.e. the primary key has to be a combination of the other properties of "some_names" instead?
Regards
Oliver
|