These are the two mappings.
Code:
<hibernate-mapping>
<class name="entity.FilesEntity" table="FILES">
<id name="id" type="java.lang.Long">
<column name="ID" precision="22" scale="0"/>
<generator class="sequence">
<param name="sequence">SEQ_FILES</param>
</generator>
</id>
<property generated="never" lazy="false" name="name" type="string">
<column length="64" name="NAME" not-null="true"/>
</property>
<set cascade="all-delete-orphan" inverse="true" name="details" order-by="ID" sort="unsorted">
<key>
<column name="FILE" not-null="true" precision="22" scale="0"/>
</key>
<one-to-many class="entity.DetailsEntity"/>
</set>
</class>
</hibernate-mapping>
Code:
<hibernate-mapping>
<class name="entity.DetailsEntity" table="DETAILS">
<id name="id" type="java.lang.Long">
<column name="ID" precision="22" scale="0"/>
<generator class="sequence">
<param name="sequence">SEQ_DETAILS</param>
</generator>
</id>
<many-to-one
class="entity.FilesEntity"
fetch="select" name="FilesEntity" update="false">
<column name="FILE" not-null="true" precision="22" scale="0"/>
</many-to-one>
<property generated="never" lazy="false" name="string" type="string">
<column length="64" name="STRING"/>
</property>
</class>
</hibernate-mapping>