Salome HOME
Mapping is fixed. Relation in the mapping is inherited from Persistent now. Versionin...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / kernel / Relation.hbm.xml
index 47b7ab86bb702bc86ed2688f7e1680438567430b..2ffa7f558ef9194c237d0f5782241f535b401301 100644 (file)
@@ -1,39 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
 <!--
-  - Mapping of the Relation class hierarchy.
-  - The entire hierarchy is mapped to one single table using a String discriminator.
-  -
-  - @author    Daniel Brunier-Coulin
-  - @copyright OPEN CASCADE 2012
-  -->
+       - Mapping of the Relation class hierarchy.
+       - The entire hierarchy is mapped to one single table using a String discriminator.
+       -
+       - @author    Daniel Brunier-Coulin
+       - @copyright OPEN CASCADE 2012
+-->
 
 <hibernate-mapping>
+       <union-subclass name="org.splat.dal.bo.kernel.Relation"
+               extends="org.splat.dal.bo.kernel.Any" abstract="true">
 
-<!--   <class name="org.splat.dal.bo.kernel.Relation" abstract="true" table="relation"> -->
-  <class name="org.splat.dal.bo.kernel.Relation" abstract="true">
-
-    <!-- int     rid   -->    
-<!--     <id name="rid" type="int" column="rid" unsaved-value="0" access="field">
-      <generator class="org.splat.dal.bo.kernel.IDGenerator"/>
-    </id>-->
-       <id name="rid" column="rid" access="field">
-        <generator class="org.hibernate.id.enhanced.SequenceStyleGenerator">
-               <param name="sequence_name">relation_id</param>
-        </generator>
-       </id>
-       <!-- <discriminator column="name" type="string"/>-->
-
-    <!-- Set<Attribute> attributes -->
-    <set name="attributes" inverse="true" lazy="false" cascade="all-delete-orphan" access="field">
-      <key         column="owner" />
-      <one-to-many class="org.splat.dal.bo.kernel.Attribute" />
-    </set>
-
-    <!-- Entity  owner -->    
-    <many-to-one name="owner" column="owner" access="field" not-null="true" />
-
-       <!-- <property name="to" column="refer" access="property" not-null="true" />-->
-  </class>
-
+               <!-- Entity  owner -->
+               <many-to-one name="owner" column="owner" access="field"
+                       not-null="true" />
+       </union-subclass>
 </hibernate-mapping>
\ No newline at end of file