Quote:
Are the mappings below correct?
No, a <one-to-many> have to go in a <set> or other collection tag. For example:
Code:
<class name="D">
<id name="d_id" column="d_id" />
<set name="e" inverse="true">
<key column="d_id">
<one-to-many class="E">
</set>
</class>
By the way. Doesn't Hibernate complains when you have the <one-to-many> by itself. If I do like this I get the error message:
Code:
org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,
(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,
((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql
-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".