diff options
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/hbm')
449 files changed, 35657 insertions, 136 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/AnyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/AnyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6faacbe4e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/AnyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,93 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.any.impl.AnyObjectImpl" entity-name="AnyObject" abstract="false" lazy="false" table="`ANYOBJECT`"> + <meta attribute="eclassName" inherit="false">AnyObject</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/any</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="globalInt" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GLOBALINT`"/> + </property> + <property name="globalString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GLOBALSTRING`"/> + </property> + <any id-type="string" meta-type="string" name="anyOne" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANYONE_ID`"/> + </any> + <list name="any" table="`ANYOBJECT_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ANYOBJECT_ANY_ID`" unique="false"/> + </key> + <list-index column="`ANYOBJECT_ANY_IDX`"/> + <one-to-many entity-name="AnyObject_any"/> + </list> + <list name="group" table="`ANYOBJECT_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ANYOBJECT_GROUP_ID`" unique="false"/> + </key> + <list-index column="`ANYOBJECT_GROUP_IDX`"/> + <one-to-many entity-name="AnyObject_group"/> + </list> + </class> + <class entity-name="AnyObject_any" lazy="false" table="`ANYOBJECT_ANY`"> + <meta attribute="featureMap" inherit="false">AnyObject</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="string" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class entity-name="AnyObject_group" lazy="false" table="`ANYOBJECT_GROUP`"> + <meta attribute="featureMap" inherit="false">AnyObject</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any1" entity-name="AnyObject_any1" cascade="all" not-null="false"/> + </class> + <class entity-name="AnyObject_any1" lazy="false" table="`ANYOBJECT_ANY1`"> + <meta attribute="featureMap" inherit="false">AnyObject</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any1_fme_any_data" type="java.lang.String"/> + <any id-type="string" meta-type="string" name="any1_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY1_ID`"/> + </any> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.any.impl.GlobalObjectTypeImpl" entity-name="GlobalObjectType" abstract="false" lazy="false" table="`GLOBALOBJECTTYPE`"> + <meta attribute="eclassName" inherit="false">GlobalObjectType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/any</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/AnyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/AnyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cca38cc37 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/AnyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,99 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.any.impl.AnyObjectImpl" entity-name="AnyObject" abstract="false" lazy="false" discriminator-value="AnyObject" table="`ANYOBJECT`"> + <meta attribute="eclassName" inherit="false">AnyObject</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/any</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ANYOBJECTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="globalInt" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GLOBALINT`"/> + </property> + <property name="globalString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GLOBALSTRING`"/> + </property> + <any id-type="string" meta-type="string" name="anyOne" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANYONE_ID`"/> + </any> + <list name="any" table="`ANYOBJECT_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ANYOBJECT_ANY_ID`" unique="false"/> + </key> + <list-index column="`ANYOBJECT_ANY_IDX`"/> + <one-to-many entity-name="AnyObject_any"/> + </list> + <list name="group" table="`ANYOBJECT_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ANYOBJECT_GROUP_ID`" unique="false"/> + </key> + <list-index column="`ANYOBJECT_GROUP_IDX`"/> + <one-to-many entity-name="AnyObject_group"/> + </list> + </class> + <class entity-name="AnyObject_any" lazy="false" table="`ANYOBJECT_ANY`"> + <meta attribute="featureMap" inherit="false">AnyObject</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="string" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class entity-name="AnyObject_group" lazy="false" table="`ANYOBJECT_GROUP`"> + <meta attribute="featureMap" inherit="false">AnyObject</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any1" entity-name="AnyObject_any1" cascade="all" not-null="false"/> + </class> + <class entity-name="AnyObject_any1" lazy="false" table="`ANYOBJECT_ANY1`"> + <meta attribute="featureMap" inherit="false">AnyObject</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any1_fme_any_data" type="java.lang.String"/> + <any id-type="string" meta-type="string" name="any1_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY1_ID`"/> + </any> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.any.impl.GlobalObjectTypeImpl" entity-name="GlobalObjectType" abstract="false" lazy="false" discriminator-value="GlobalObjectType" table="`GLOBALOBJECTTYPE`"> + <meta attribute="eclassName" inherit="false">GlobalObjectType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/any</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="GLOBALOBJECTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/BZ290969Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/BZ290969Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5e45cfab9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/BZ290969Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,48 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz290969.impl.BarImpl" entity-name="BarEntity" abstract="false" lazy="false" table="`BARENTITY`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz290969</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="barKeys" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BARENTITY_BARKEYS"> + <column name="`BARENTITY_BARKEYS_E_ID`" unique="false"/> + </key> + <list-index column="`BARENTITY_BARKEYS_IDX`"/> + <one-to-many entity-name="BarKeyEntity"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz290969.impl.BarKeyImpl" entity-name="BarKeyEntity" abstract="false" lazy="false" table="`BARKEYENTITY`"> + <meta attribute="eclassName" inherit="false">BarKey</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz290969</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz290969.impl.FooImpl" entity-name="FooEntity" abstract="false" lazy="false" table="`FOOENTITY`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz290969</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="barKey" entity-name="BarKeyEntity" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FOOENTITY_BARKEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BARKEYENTITY_BARKEY_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/BZ290969Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/BZ290969Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..efe7981df --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/BZ290969Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,57 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz290969.impl.BarImpl" entity-name="BarEntity" abstract="false" lazy="false" discriminator-value="BarEntity" table="`BARENTITY`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz290969</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BARENTITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="barKeys" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BARENTITY_BARKEYS"> + <column name="`BARENTITY_BARKEYS_E_ID`" unique="false"/> + </key> + <list-index column="`BARENTITY_BARKEYS_IDX`"/> + <one-to-many entity-name="BarKeyEntity"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz290969.impl.BarKeyImpl" entity-name="BarKeyEntity" abstract="false" lazy="false" discriminator-value="BarKeyEntity" table="`BARKEYENTITY`"> + <meta attribute="eclassName" inherit="false">BarKey</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz290969</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BARKEYENTITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz290969.impl.FooImpl" entity-name="FooEntity" abstract="false" lazy="false" discriminator-value="FooEntity" table="`FOOENTITY`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz290969</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FOOENTITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="barKey" entity-name="BarKeyEntity" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FOOENTITY_BARKEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BARKEYENTITY_BARKEY_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVCascadeDeleteAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVCascadeDeleteAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7bf8c5f9a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVCascadeDeleteAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="eavlibrary.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.CityImpl" entity-name="City" abstract="false" lazy="false" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" table="`LIBRARY_WRITER`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <many-to-many entity-name="Writer" unique="true" foreign-key="schrijvers"> + <column name="`WRITER_E_ID`" unique="false"/> + </many-to-many> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.PenImpl" entity-name="Pen" abstract="false" lazy="false" table="`PEN`"> + <meta attribute="eclassName" inherit="false">Pen</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVCascadeDeleteAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVCascadeDeleteAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..26ab21419 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVCascadeDeleteAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,107 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="eavlibrary.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.CityImpl" entity-name="City" abstract="false" lazy="false" discriminator-value="City" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" table="`LIBRARY_WRITER`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <many-to-many entity-name="Writer" unique="true" foreign-key="schrijvers"> + <column name="`WRITER_E_ID`" unique="false"/> + </many-to-many> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.PenImpl" entity-name="Pen" abstract="false" lazy="false" discriminator-value="Pen" table="`PEN`"> + <meta attribute="eclassName" inherit="false">Pen</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PENDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5d314cc5e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5d314cc5e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7bf8c5f9a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="eavlibrary.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.CityImpl" entity-name="City" abstract="false" lazy="false" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" table="`LIBRARY_WRITER`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <many-to-many entity-name="Writer" unique="true" foreign-key="schrijvers"> + <column name="`WRITER_E_ID`" unique="false"/> + </many-to-many> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.PenImpl" entity-name="Pen" abstract="false" lazy="false" table="`PEN`"> + <meta attribute="eclassName" inherit="false">Pen</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..26ab21419 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,107 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="eavlibrary.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.CityImpl" entity-name="City" abstract="false" lazy="false" discriminator-value="City" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" table="`LIBRARY_WRITER`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <many-to-many entity-name="Writer" unique="true" foreign-key="schrijvers"> + <column name="`WRITER_E_ID`" unique="false"/> + </many-to-many> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.PenImpl" entity-name="Pen" abstract="false" lazy="false" discriminator-value="Pen" table="`PEN`"> + <meta attribute="eclassName" inherit="false">Pen</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PENDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAllAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAllAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6d7e31a69 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAllAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,40 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="eavlibrary.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.CityImpl" entity-name="City" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="City" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.City"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Library" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Library"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Writer" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Writer"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.PenImpl" entity-name="Pen" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Pen" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Pen"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAllAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAllAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0138b86f4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EAVMappingAllAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,43 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="eavlibrary.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" discriminator-value="Book" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/eavlibrary</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.CityImpl" entity-name="City" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="City" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.City"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Library" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Library"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Writer" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Writer"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.impl.PenImpl" entity-name="Pen" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Pen" proxy="org.eclipse.emf.teneo.samples.emf.annotations.eavlibrary.Pen"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EMapEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EMapEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..01c3ab64c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EMapEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,8 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToWriterMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EMapEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EMapEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..01c3ab64c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/EMapEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,8 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToWriterMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..84b1747ec --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,47 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/extralazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="authors" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="BOOK_AUTHORS"> + <column name="`BOOK_AUTHORS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_AUTHORS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="subTitles" table="`BOOK_SUBTITLES`" lazy="extra" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_SUBTITLES_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_SUBTITLES_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/extralazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..79f48f47d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,53 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/extralazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="authors" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="BOOK_AUTHORS"> + <column name="`BOOK_AUTHORS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_AUTHORS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="subTitles" table="`BOOK_SUBTITLES`" lazy="extra" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_SUBTITLES_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_SUBTITLES_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.extralazy.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/extralazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_e_o_hibernate.hbm.xml index fbe802af2..9d87600b1 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_e_o_hibernate.hbm.xml @@ -51,19 +51,19 @@ </property> <bag name="containedItem" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="TESTSET_ITEMLIST_CONTAINEDITEM"> - <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" not-null="false" unique="false"/> + <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" unique="false"/> </key> <one-to-many entity-name="testSet.ContainedItem"/> </bag> - <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="merge,persist,save-update,lock,refresh"> + <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> <key update="true"> - <column name="`ITEM_ITEMLIST_E_ID`" not-null="false" unique="false"/> + <column name="`ITEM_ITEMLIST_E_ID`" unique="false"/> </key> <one-to-many entity-name="testSet.Item"/> </bag> - <bag name="joinedItem" order-by="ABS(number)" inverse="true" lazy="extra" cascade="merge,persist,save-update,lock,refresh"> + <bag name="joinedItem" order-by="ABS(number)" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> <key update="true" foreign-key="TESTSET_ITEMLIST_JOINEDITEM"> - <column name="`ITEMLIST_JOINEDITEM_E_ID`" not-null="false" unique="false"/> + <column name="`ITEMLIST_JOINEDITEM_E_ID`" unique="false"/> </key> <one-to-many entity-name="testSet.Item"/> </bag> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_h_o_hibernate.hbm.xml index 7330c9361..93a8c29c0 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/ExtraLazySetAction_hsqldb_h_o_hibernate.hbm.xml @@ -10,7 +10,7 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="DTYPE" index="TESTSET_CONTAINEDITEMDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="TESTSET_CONTAINEDITEMDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> @@ -27,7 +27,7 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="DTYPE" index="TESTSET_ITEMDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="TESTSET_ITEMDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> @@ -50,7 +50,7 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="DTYPE" index="TESTSET_ITEMLISTDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="TESTSET_ITEMLISTDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> @@ -60,19 +60,19 @@ </property> <bag name="containedItem" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="TESTSET_ITEMLIST_CONTAINEDITEM"> - <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" not-null="false" unique="false"/> + <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" unique="false"/> </key> <one-to-many entity-name="testSet.ContainedItem"/> </bag> - <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="merge,persist,save-update,lock,refresh"> + <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> <key update="true"> - <column name="`ITEM_ITEMLIST_E_ID`" not-null="false" unique="false"/> + <column name="`ITEM_ITEMLIST_E_ID`" unique="false"/> </key> <one-to-many entity-name="testSet.Item"/> </bag> - <bag name="joinedItem" order-by="ABS(number)" inverse="true" lazy="extra" cascade="merge,persist,save-update,lock,refresh"> + <bag name="joinedItem" order-by="ABS(number)" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> <key update="true" foreign-key="TESTSET_ITEMLIST_JOINEDITEM"> - <column name="`ITEMLIST_JOINEDITEM_E_ID`" not-null="false" unique="false"/> + <column name="`ITEMLIST_JOINEDITEM_E_ID`" unique="false"/> </key> <one-to-many entity-name="testSet.Item"/> </bag> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_e_o_hibernate.hbm.xml index 0e3bcd396..7c3391058 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_e_o_hibernate.hbm.xml @@ -15,9 +15,9 @@ <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`NAME`"/> </property> - <bag name="children" lazy="true" cascade="persist,merge,refresh,delete,save-update,delete-orphan"> + <bag name="children" lazy="true" cascade="persist,merge,refresh,delete,save-update,delete-orphan,lock"> <key update="true" foreign-key="PARENT_CHILDREN"> - <column name="`PARENT_CHILDREN_E_ID`" not-null="false" unique="false"/> + <column name="`PARENT_CHILDREN_E_ID`" unique="false"/> </key> <one-to-many entity-name="Child"/> </bag> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_h_o_hibernate.hbm.xml index 1689f5e5d..9945fa18f 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbCascadeAction_hsqldb_h_o_hibernate.hbm.xml @@ -10,7 +10,7 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="DTYPE" index="PARENTDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="PARENTDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> @@ -18,9 +18,9 @@ <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`NAME`"/> </property> - <bag name="children" lazy="true" cascade="persist,merge,refresh,delete,save-update,delete-orphan"> + <bag name="children" lazy="true" cascade="persist,merge,refresh,delete,save-update,delete-orphan,lock"> <key update="true" foreign-key="PARENT_CHILDREN"> - <column name="`PARENT_CHILDREN_E_ID`" not-null="false" unique="false"/> + <column name="`PARENT_CHILDREN_E_ID`" unique="false"/> </key> <one-to-many entity-name="Child"/> </bag> @@ -33,7 +33,7 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="DTYPE" index="CHILDDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="CHILDDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbIdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbIdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..49ef58b1f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbIdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,41 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.IdentityIDImpl" entity-name="IdentityID" abstract="false" lazy="false" table="`IDENTITYID`"> + <meta attribute="eclassName" inherit="false">IdentityID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="identity"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.SimpleIDImpl" entity-name="SimpleID" abstract="false" lazy="false" table="`SIMPLEID`"> + <meta attribute="eclassName" inherit="false">SimpleID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOD`"/> + <generator class="native"/> + </id> + <version name="generated" type="long"> + <column not-null="true" unique="false" name="`GENERATED`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.TableIDImpl" entity-name="TableID" abstract="false" lazy="false" table="`TABLEID`"> + <meta attribute="eclassName" inherit="false">TableID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">hilo_table</param> + <param name="column">the_hilo_column</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbIdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbIdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a45b1a9de --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbIdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,50 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.IdentityIDImpl" entity-name="IdentityID" abstract="false" lazy="false" discriminator-value="IdentityID" table="`IDENTITYID`"> + <meta attribute="eclassName" inherit="false">IdentityID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="identity"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="IDENTITYIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.SimpleIDImpl" entity-name="SimpleID" abstract="false" lazy="false" discriminator-value="SimpleID" table="`SIMPLEID`"> + <meta attribute="eclassName" inherit="false">SimpleID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOD`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLEIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="generated" type="long"> + <column not-null="true" unique="false" name="`GENERATED`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.TableIDImpl" entity-name="TableID" abstract="false" lazy="false" discriminator-value="TableID" table="`TABLEID`"> + <meta attribute="eclassName" inherit="false">TableID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">hilo_table</param> + <param name="column">the_hilo_column</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TABLEIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbSequenceIdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbSequenceIdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..49ef58b1f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbSequenceIdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,41 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.IdentityIDImpl" entity-name="IdentityID" abstract="false" lazy="false" table="`IDENTITYID`"> + <meta attribute="eclassName" inherit="false">IdentityID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="identity"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.SimpleIDImpl" entity-name="SimpleID" abstract="false" lazy="false" table="`SIMPLEID`"> + <meta attribute="eclassName" inherit="false">SimpleID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOD`"/> + <generator class="native"/> + </id> + <version name="generated" type="long"> + <column not-null="true" unique="false" name="`GENERATED`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.TableIDImpl" entity-name="TableID" abstract="false" lazy="false" table="`TABLEID`"> + <meta attribute="eclassName" inherit="false">TableID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">hilo_table</param> + <param name="column">the_hilo_column</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbSequenceIdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbSequenceIdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a45b1a9de --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HbSequenceIdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,50 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.IdentityIDImpl" entity-name="IdentityID" abstract="false" lazy="false" discriminator-value="IdentityID" table="`IDENTITYID`"> + <meta attribute="eclassName" inherit="false">IdentityID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="identity"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="IDENTITYIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.SimpleIDImpl" entity-name="SimpleID" abstract="false" lazy="false" discriminator-value="SimpleID" table="`SIMPLEID`"> + <meta attribute="eclassName" inherit="false">SimpleID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOD`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLEIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="generated" type="long"> + <column not-null="true" unique="false" name="`GENERATED`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hb.generator.id.impl.TableIDImpl" entity-name="TableID" abstract="false" lazy="false" discriminator-value="TableID" table="`TABLEID`"> + <meta attribute="eclassName" inherit="false">TableID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hb/generator/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">hilo_table</param> + <param name="column">the_hilo_column</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TABLEIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HibernateAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HibernateAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1b0e25cd6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HibernateAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,64 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.CityImpl" entity-name="Stad" abstract="false" lazy="true" table="`STAD`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.City"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="streets" inverse="true" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CITY_FK`" unique="false"/> + </key> + <one-to-many entity-name="Street" not-found="ignore"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.StreetImpl" entity-name="Street" abstract="false" lazy="true" table="`STREET`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.Street"> + <meta attribute="eclassName" inherit="false">Street</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="city" entity-name="Stad" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="STREET_CITY" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`CITY_FK`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.StateImpl" entity-name="State" abstract="false" lazy="true" table="`STATE`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.State"> + <meta attribute="eclassName" inherit="false">State</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <one-to-one name="stateDetail" entity-name="StateDetail" fetch="join" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" property-ref="state"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.StateDetailImpl" entity-name="StateDetail" abstract="false" lazy="true" table="`STATEDETAIL`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.StateDetail"> + <meta attribute="eclassName" inherit="false">StateDetail</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="state" entity-name="State" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" insert="true" update="true"> + <column not-null="false" unique="false" name="`STATE_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HibernateAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HibernateAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..91c0eaa17 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/HibernateAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,76 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.CityImpl" entity-name="Stad" abstract="false" lazy="true" discriminator-value="Stad" table="`STAD`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.City"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STADDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="streets" inverse="true" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CITY_FK`" unique="false"/> + </key> + <one-to-many entity-name="Street" not-found="ignore"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.StreetImpl" entity-name="Street" abstract="false" lazy="true" discriminator-value="Street" table="`STREET`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.Street"> + <meta attribute="eclassName" inherit="false">Street</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STREETDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="city" entity-name="Stad" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="STREET_CITY" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`CITY_FK`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.StateImpl" entity-name="State" abstract="false" lazy="true" discriminator-value="State" table="`STATE`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.State"> + <meta attribute="eclassName" inherit="false">State</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STATEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <one-to-one name="stateDetail" entity-name="StateDetail" fetch="join" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" property-ref="state"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.impl.StateDetailImpl" entity-name="StateDetail" abstract="false" lazy="true" discriminator-value="StateDetail" table="`STATEDETAIL`" proxy="org.eclipse.emf.teneo.samples.emf.annotations.hibernate.StateDetail"> + <meta attribute="eclassName" inherit="false">StateDetail</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hibernate</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STATEDETAILDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="state" entity-name="State" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" insert="true" update="true"> + <column not-null="false" unique="false" name="`STATE_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/IdTypeTestOneAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/IdTypeTestOneAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5721d33f0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/IdTypeTestOneAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,25 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.NameImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/IdTypeTestOneAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/IdTypeTestOneAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b133469bf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/IdTypeTestOneAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.NameImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/JoinColumnsTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/JoinColumnsTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..368ffaab2 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/JoinColumnsTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,89 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <composite-id class="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID" mapped="true"> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <version name="myversion" column="myversion" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="friends" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`PERSON_PERSON`"> + <key update="true"> + <column name="`PERSON_FRIENDS_FIRSTNAME`" unique="false"/> + <column name="`PERSON_FRIENDS_LASTNAME`" unique="false"/> + </key> + <many-to-many entity-name="Person" unique="false" foreign-key="PERSON_FRIENDS"> + <column name="`PERSON_OPPOSITEFRIENDS_FIRSTNAME`" not-null="true" unique="false"/> + <column name="`PERSON_OPPOSITEFRIENDS_LASTNAME`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="oppositeFriends" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`PERSON_PERSON`"> + <key update="true"> + <column name="`PERSON_OPPOSITEFRIENDS_FIRSTNAME`" unique="false"/> + <column name="`PERSON_OPPOSITEFRIENDS_LASTNAME`" unique="false"/> + </key> + <many-to-many entity-name="Person" unique="false" foreign-key="PERSON_OPPOSITEFRIENDS"> + <column name="`PERSON_FRIENDS_FIRSTNAME`" not-null="true" unique="false"/> + <column name="`PERSON_FRIENDS_LASTNAME`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" extends="Person" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <key> + <column name="`PERSON_FIRSTNAME`"/> + <column name="`PERSON_LASTNAME`"/> + </key> + <list name="children" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`MYPARENTFIRSTNAME`" unique="false"/> + <column name="`MYPARENTLASTNAME`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Person" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <key> + <column name="`PERSON_FIRSTNAME`"/> + <column name="`PERSON_LASTNAME`"/> + </key> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.HouseImpl" entity-name="House" abstract="false" lazy="false" table="`HOUSE`"> + <meta attribute="eclassName" inherit="false">House</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="myversion" column="myversion" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="owner" entity-name="Parent" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOUSE_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PARENT_OWNER_FIRSTNAME`"/> + <column not-null="false" unique="false" name="`PARENT_OWNER_LASTNAME`"/> + </many-to-one> + <list name="visitors" table="`HOUSE_PERSON`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`RIGHTCOLUMN`" unique="false"/> + </key> + <list-index column="`HOUSE_VISITORS_IDX`"/> + <many-to-many entity-name="Person" unique="true" foreign-key="HOUSE_VISITORS"> + <column name="`PERSON_FIRSTNAME`" unique="false"/> + <column name="`PERSON_LASTNAME`" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/JoinColumnsTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/JoinColumnsTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cb4ac9927 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/JoinColumnsTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,87 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <composite-id class="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID" mapped="true"> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="myversion" column="myversion" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="friends" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`PERSON_PERSON`"> + <key update="true"> + <column name="`PERSON_FRIENDS_FIRSTNAME`" unique="false"/> + <column name="`PERSON_FRIENDS_LASTNAME`" unique="false"/> + </key> + <many-to-many entity-name="Person" unique="false" foreign-key="PERSON_FRIENDS"> + <column name="`PERSON_OPPOSITEFRIENDS_FIRSTNAME`" not-null="true" unique="false"/> + <column name="`PERSON_OPPOSITEFRIENDS_LASTNAME`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="oppositeFriends" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`PERSON_PERSON`"> + <key update="true"> + <column name="`PERSON_OPPOSITEFRIENDS_FIRSTNAME`" unique="false"/> + <column name="`PERSON_OPPOSITEFRIENDS_LASTNAME`" unique="false"/> + </key> + <many-to-many entity-name="Person" unique="false" foreign-key="PERSON_OPPOSITEFRIENDS"> + <column name="`PERSON_FRIENDS_FIRSTNAME`" not-null="true" unique="false"/> + <column name="`PERSON_FRIENDS_LASTNAME`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" extends="Person" discriminator-value="Parent"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <list name="children" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`MYPARENTFIRSTNAME`" unique="false"/> + <column name="`MYPARENTLASTNAME`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Person" discriminator-value="Child"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.joincolumns.impl.HouseImpl" entity-name="House" abstract="false" lazy="false" discriminator-value="House" table="`HOUSE`"> + <meta attribute="eclassName" inherit="false">House</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/joincolumns</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="HOUSEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="myversion" column="myversion" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="owner" entity-name="Parent" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOUSE_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PARENT_OWNER_FIRSTNAME`"/> + <column not-null="false" unique="false" name="`PARENT_OWNER_LASTNAME`"/> + </many-to-one> + <list name="visitors" table="`HOUSE_PERSON`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`RIGHTCOLUMN`" unique="false"/> + </key> + <list-index column="`HOUSE_VISITORS_IDX`"/> + <many-to-many entity-name="Person" unique="true" foreign-key="HOUSE_VISITORS"> + <column name="`PERSON_FIRSTNAME`" unique="false"/> + <column name="`PERSON_LASTNAME`" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/SetAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/SetAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4d0d8c3ff --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/SetAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ContainedItemImpl" entity-name="testSet.ContainedItem" abstract="false" lazy="false" table="`TESTSET_CONTAINEDITEM`"> + <meta attribute="eclassName" inherit="false">ContainedItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemImpl" entity-name="testSet.Item" abstract="false" lazy="false" table="`TESTSET_ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="itemList" entity-name="testSet.ItemList" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TESTSET_ITEM_ITEMLIST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ITEM_ITEMLIST_E_ID`"/> + </many-to-one> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemListImpl" entity-name="testSet.ItemList" abstract="false" lazy="false" table="`TESTSET_ITEMLIST`"> + <meta attribute="eclassName" inherit="false">ItemList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="containedItem" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TESTSET_ITEMLIST_CONTAINEDITEM"> + <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="testSet.ContainedItem"/> + </bag> + <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ITEM_ITEMLIST_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="testSet.Item"/> + </bag> + <bag name="joinedItem" order-by="ABS(number)" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="TESTSET_ITEMLIST_JOINEDITEM"> + <column name="`ITEMLIST_JOINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="testSet.Item"/> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/SetAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/SetAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..915f631a3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/SetAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,80 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ContainedItemImpl" entity-name="testSet.ContainedItem" abstract="false" lazy="false" discriminator-value="testSet.ContainedItem" table="`TESTSET_CONTAINEDITEM`"> + <meta attribute="eclassName" inherit="false">ContainedItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTSET_CONTAINEDITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemImpl" entity-name="testSet.Item" abstract="false" lazy="false" discriminator-value="testSet.Item" table="`TESTSET_ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTSET_ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="itemList" entity-name="testSet.ItemList" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TESTSET_ITEM_ITEMLIST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ITEM_ITEMLIST_E_ID`"/> + </many-to-one> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemListImpl" entity-name="testSet.ItemList" abstract="false" lazy="false" discriminator-value="testSet.ItemList" table="`TESTSET_ITEMLIST`"> + <meta attribute="eclassName" inherit="false">ItemList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTSET_ITEMLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="containedItem" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TESTSET_ITEMLIST_CONTAINEDITEM"> + <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="testSet.ContainedItem"/> + </bag> + <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ITEM_ITEMLIST_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="testSet.Item"/> + </bag> + <bag name="joinedItem" order-by="ABS(number)" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="TESTSET_ITEMLIST_JOINEDITEM"> + <column name="`ITEMLIST_JOINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="testSet.Item"/> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..160d3f1d1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,93 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="nameType" class="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.NameType"/> + <typedef name="usertype.PhoneNumber" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + <param name="edatatype">PhoneNumber</param> + </typedef> + <typedef name="intArrayType" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + <param name="edatatype">IntArray</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" polymorphism="explicit" optimistic-lock="none" dynamic-insert="true" dynamic-update="true" select-before-update="true" persister="org.hibernate.persister.entity.SingleTableEntityPersister" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="nameType"> + <column not-null="false" unique="false" name="`FIRST_NAME`"/> + <column not-null="false" unique="false" name="`LAST_NAME`"/> + </property> + <property name="numbers" lazy="false" insert="true" update="true" not-null="true" unique="false" type="intArrayType"> + <column not-null="true" unique="false" name="`NUMBERS`"/> + </property> + <list name="phoneNumbers" table="`PERSON_PHONENUMBERS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSON_PHONENUMBERS_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_PHONENUMBERS_IDX`"/> + <element type="usertype.PhoneNumber"/> + </list> + <property name="emergencyContact" lazy="false" insert="true" update="true" not-null="false" unique="false" type="usertype.PhoneNumber"> + <column not-null="false" unique="false" name="`EMERGENCYCONTACT`"/> + </property> + <bag name="addresses" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ADDRESS_PERSON_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Address"/> + </bag> + <property name="birthPlace" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BIRTHPLACE`"/> + </property> + <property name="double" lazy="false" insert="true" update="true" not-null="true" unique="false"> + <column not-null="true" unique="false" name="`DOUBLE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + <param name="edatatype">myDoubleType</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="addressInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ADDRESSINFO`"/> + </property> + <many-to-one name="person" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_PERSON" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_PERSON_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CityImpl" entity-name="City" abstract="false" lazy="false" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="assigned"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize</param> + <param name="eclassifier">CitySize</param> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + </type> + </property> + </class> + <query name="getPersonByBirthPlace2"><![CDATA[select p from Person p where p.birthPlace=?]]></query> + <query name="getPersonByBirthPlace"><![CDATA[select p from Person p where p.birthPlace=?]]></query> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c26769951 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,102 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="nameType" class="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.NameType"/> + <typedef name="usertype.PhoneNumber" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + <param name="edatatype">PhoneNumber</param> + </typedef> + <typedef name="intArrayType" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + <param name="edatatype">IntArray</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" polymorphism="explicit" optimistic-lock="none" dynamic-insert="true" dynamic-update="true" select-before-update="true" persister="org.hibernate.persister.entity.SingleTableEntityPersister" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="nameType"> + <column not-null="false" unique="false" name="`FIRST_NAME`"/> + <column not-null="false" unique="false" name="`LAST_NAME`"/> + </property> + <property name="numbers" lazy="false" insert="true" update="true" not-null="true" unique="false" type="intArrayType"> + <column not-null="true" unique="false" name="`NUMBERS`"/> + </property> + <list name="phoneNumbers" table="`PERSON_PHONENUMBERS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSON_PHONENUMBERS_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_PHONENUMBERS_IDX`"/> + <element type="usertype.PhoneNumber"/> + </list> + <property name="emergencyContact" lazy="false" insert="true" update="true" not-null="false" unique="false" type="usertype.PhoneNumber"> + <column not-null="false" unique="false" name="`EMERGENCYCONTACT`"/> + </property> + <bag name="addresses" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ADDRESS_PERSON_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Address"/> + </bag> + <property name="birthPlace" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BIRTHPLACE`"/> + </property> + <property name="double" lazy="false" insert="true" update="true" not-null="true" unique="false"> + <column not-null="true" unique="false" name="`DOUBLE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + <param name="edatatype">myDoubleType</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="addressInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ADDRESSINFO`"/> + </property> + <many-to-one name="person" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_PERSON" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_PERSON_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CityImpl" entity-name="City" abstract="false" lazy="false" discriminator-value="City" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="assigned"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize</param> + <param name="eclassifier">CitySize</param> + <param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param> + </type> + </property> + </class> + <query name="getPersonByBirthPlace2"><![CDATA[select p from Person p where p.birthPlace=?]]></query> + <query name="getPersonByBirthPlace"><![CDATA[select p from Person p where p.birthPlace=?]]></query> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachFeatureMapTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachFeatureMapTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachFeatureMapTest$1_hsqldb_e_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachFeatureMapTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachFeatureMapTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachFeatureMapTest$1_hsqldb_h_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..067f184f0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,60 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestAImpl" entity-name="TestA" abstract="false" lazy="false" table="`TESTA`"> + <meta attribute="eclassName" inherit="false">TestA</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <many-to-one name="testB" entity-name="TestB" lazy="false" cascade="all" foreign-key="TESTA_TESTB" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`TESTB_TESTB_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestBImpl" entity-name="TestB" abstract="false" lazy="false" table="`TESTB`"> + <meta attribute="eclassName" inherit="false">TestB</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestCImpl" entity-name="TestC" abstract="false" lazy="false" table="`TESTC`"> + <meta attribute="eclassName" inherit="false">TestC</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="myDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`MYDATE`"/> + </property> + <list name="testB" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TESTC_TESTB"> + <column name="`TESTC_TESTB_E_ID`" unique="false"/> + </key> + <list-index column="`TESTC_TESTB_IDX`"/> + <one-to-many entity-name="TestB"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..98c9e16b0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.detach/DetachTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,69 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestAImpl" entity-name="TestA" abstract="false" lazy="false" discriminator-value="TestA" table="`TESTA`"> + <meta attribute="eclassName" inherit="false">TestA</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTADTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <many-to-one name="testB" entity-name="TestB" lazy="false" cascade="all" foreign-key="TESTA_TESTB" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`TESTB_TESTB_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestBImpl" entity-name="TestB" abstract="false" lazy="false" discriminator-value="TestB" table="`TESTB`"> + <meta attribute="eclassName" inherit="false">TestB</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTBDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestCImpl" entity-name="TestC" abstract="false" lazy="false" discriminator-value="TestC" table="`TESTC`"> + <meta attribute="eclassName" inherit="false">TestC</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTCDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="myDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`MYDATE`"/> + </property> + <list name="testB" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TESTC_TESTB"> + <column name="`TESTC_TESTB_E_ID`" unique="false"/> + </key> + <list-index column="`TESTC_TESTB_IDX`"/> + <one-to-many entity-name="TestB"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..0f2012577 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,127 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="featuremap.ProductClassificationObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + <param name="edatatype">ProductClassificationObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.PriceByQuantityTypeImpl" entity-name="PriceByQuantityType" abstract="false" lazy="false" table="`PRICEBYQUANTITYTYPE`"> + <meta attribute="eclassName" inherit="false">PriceByQuantityType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`PRODUCTTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP_IDX`"/> + <one-to-many entity-name="ProductType_group"/> + </list> + <property name="productClassification" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`PRODUCTCLASSIFICATION`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.elist.featuremap.ProductClassification</param> + <param name="eclassifier">ProductClassification</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + </type> + </property> + <list name="group1" table="`PRODUCTTYPE_GROUP1`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP1_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP1_IDX`"/> + <one-to-many entity-name="ProductType_group1"/> + </list> + </class> + <class entity-name="ProductType_group" lazy="false" table="`PRODUCTTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_DESCRIPTION`"/> + </property> + <many-to-one name="translatedDescription" entity-name="TranslatedDescriptionType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_TRANSLATEDDESCRIPTION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_TRANSLATEDDESCRIPTIONTYPE_TRANSLATEDDESCRIPTION_E_ID`"/> + </many-to-one> + </class> + <class entity-name="ProductType_group1" lazy="false" table="`PRODUCTTYPE_GROUP1`"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="priceByQuantity" entity-name="PriceByQuantityType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICEBYQUANTITY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_PRICEBYQUANTITYTYPE_PRICEBYQUANTITY_E_ID`"/> + </many-to-one> + <many-to-one name="priceFromSupplier" entity-name="SupplierPriceType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_PRICEFROMSUPPLIER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_SUPPLIERPRICETYPE_PRICEFROMSUPPLIER_E_ID`"/> + </many-to-one> + <property name="simplePrice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`GROUP1_SIMPLEPRICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.SupplierPriceTypeImpl" entity-name="SupplierPriceType" abstract="false" lazy="false" table="`SUPPLIERPRICETYPE`"> + <meta attribute="eclassName" inherit="false">SupplierPriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.TranslatedDescriptionTypeImpl" entity-name="TranslatedDescriptionType" abstract="false" lazy="false" table="`TRANSLATEDDESCRIPTIONTYPE`"> + <meta attribute="eclassName" inherit="false">TranslatedDescriptionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="language" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LANGUAGE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6de513dff --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,139 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="featuremap.ProductClassificationObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + <param name="edatatype">ProductClassificationObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.PriceByQuantityTypeImpl" entity-name="PriceByQuantityType" abstract="false" lazy="false" discriminator-value="PriceByQuantityType" table="`PRICEBYQUANTITYTYPE`"> + <meta attribute="eclassName" inherit="false">PriceByQuantityType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRICEBYQUANTITYTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" discriminator-value="ProductType" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`PRODUCTTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP_IDX`"/> + <one-to-many entity-name="ProductType_group"/> + </list> + <property name="productClassification" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`PRODUCTCLASSIFICATION`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.elist.featuremap.ProductClassification</param> + <param name="eclassifier">ProductClassification</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + </type> + </property> + <list name="group1" table="`PRODUCTTYPE_GROUP1`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP1_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP1_IDX`"/> + <one-to-many entity-name="ProductType_group1"/> + </list> + </class> + <class entity-name="ProductType_group" lazy="false" table="`PRODUCTTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_DESCRIPTION`"/> + </property> + <many-to-one name="translatedDescription" entity-name="TranslatedDescriptionType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_TRANSLATEDDESCRIPTION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_TRANSLATEDDESCRIPTIONTYPE_TRANSLATEDDESCRIPTION_E_ID`"/> + </many-to-one> + </class> + <class entity-name="ProductType_group1" lazy="false" table="`PRODUCTTYPE_GROUP1`"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="priceByQuantity" entity-name="PriceByQuantityType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICEBYQUANTITY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_PRICEBYQUANTITYTYPE_PRICEBYQUANTITY_E_ID`"/> + </many-to-one> + <many-to-one name="priceFromSupplier" entity-name="SupplierPriceType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_PRICEFROMSUPPLIER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_SUPPLIERPRICETYPE_PRICEFROMSUPPLIER_E_ID`"/> + </many-to-one> + <property name="simplePrice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`GROUP1_SIMPLEPRICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.SupplierPriceTypeImpl" entity-name="SupplierPriceType" abstract="false" lazy="false" discriminator-value="SupplierPriceType" table="`SUPPLIERPRICETYPE`"> + <meta attribute="eclassName" inherit="false">SupplierPriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERPRICETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.TranslatedDescriptionTypeImpl" entity-name="TranslatedDescriptionType" abstract="false" lazy="false" discriminator-value="TranslatedDescriptionType" table="`TRANSLATEDDESCRIPTIONTYPE`"> + <meta attribute="eclassName" inherit="false">TranslatedDescriptionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TRANSLATEDDESCRIPTIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="language" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LANGUAGE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapComponentAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapComponentAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b9e20bf6b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapComponentAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,117 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="featuremap.ProductClassificationObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + <param name="edatatype">ProductClassificationObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.PriceByQuantityTypeImpl" entity-name="PriceByQuantityType" abstract="false" lazy="false" table="`PRICEBYQUANTITYTYPE`"> + <meta attribute="eclassName" inherit="false">PriceByQuantityType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`PRODUCTTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.hibernate.mapping.elist.HibernateFeatureMapEntry"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <tuplizer entity-mode="pojo" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <property name="fme_feature" type="java.lang.String"/> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_DESCRIPTION`"/> + </property> + <many-to-one name="translatedDescription" entity-name="TranslatedDescriptionType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_TRANSLATEDDESCRIPTION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_TRANSLATEDDESCRIPTIONTYPE_TRANSLATEDDESCRIPTION_E_ID`"/> + </many-to-one> + </composite-element> + </list> + <property name="productClassification" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`PRODUCTCLASSIFICATION`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.elist.featuremap.ProductClassification</param> + <param name="eclassifier">ProductClassification</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + </type> + </property> + <list name="group1" table="`PRODUCTTYPE_GROUP1`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP1_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP1_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.hibernate.mapping.elist.HibernateFeatureMapEntry"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <tuplizer entity-mode="pojo" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="priceByQuantity" entity-name="PriceByQuantityType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICEBYQUANTITY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_PRICEBYQUANTITYTYPE_PRICEBYQUANTITY_E_ID`"/> + </many-to-one> + <many-to-one name="priceFromSupplier" entity-name="SupplierPriceType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_PRICEFROMSUPPLIER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_SUPPLIERPRICETYPE_PRICEFROMSUPPLIER_E_ID`"/> + </many-to-one> + <property name="simplePrice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`GROUP1_SIMPLEPRICE`"/> + </property> + </composite-element> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.SupplierPriceTypeImpl" entity-name="SupplierPriceType" abstract="false" lazy="false" table="`SUPPLIERPRICETYPE`"> + <meta attribute="eclassName" inherit="false">SupplierPriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.TranslatedDescriptionTypeImpl" entity-name="TranslatedDescriptionType" abstract="false" lazy="false" table="`TRANSLATEDDESCRIPTIONTYPE`"> + <meta attribute="eclassName" inherit="false">TranslatedDescriptionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="language" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LANGUAGE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapComponentAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapComponentAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..79d11f18d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapComponentAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="featuremap.ProductClassificationObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + <param name="edatatype">ProductClassificationObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.PriceByQuantityTypeImpl" entity-name="PriceByQuantityType" abstract="false" lazy="false" discriminator-value="PriceByQuantityType" table="`PRICEBYQUANTITYTYPE`"> + <meta attribute="eclassName" inherit="false">PriceByQuantityType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRICEBYQUANTITYTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" discriminator-value="ProductType" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`PRODUCTTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.hibernate.mapping.elist.HibernateFeatureMapEntry"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <tuplizer entity-mode="pojo" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <property name="fme_feature" type="java.lang.String"/> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_DESCRIPTION`"/> + </property> + <many-to-one name="translatedDescription" entity-name="TranslatedDescriptionType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_TRANSLATEDDESCRIPTION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_TRANSLATEDDESCRIPTIONTYPE_TRANSLATEDDESCRIPTION_E_ID`"/> + </many-to-one> + </composite-element> + </list> + <property name="productClassification" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`PRODUCTCLASSIFICATION`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.elist.featuremap.ProductClassification</param> + <param name="eclassifier">ProductClassification</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + </type> + </property> + <list name="group1" table="`PRODUCTTYPE_GROUP1`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTTYPE_GROUP1_NAME`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_GROUP1_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.hibernate.mapping.elist.HibernateFeatureMapEntry"> + <meta attribute="featureMap" inherit="false">ProductType</meta> + <tuplizer entity-mode="pojo" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.teneo.hibernate.mapping.elist.FeatureMapEntryComponentTuplizer"/> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="priceByQuantity" entity-name="PriceByQuantityType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICEBYQUANTITY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_PRICEBYQUANTITYTYPE_PRICEBYQUANTITY_E_ID`"/> + </many-to-one> + <many-to-one name="priceFromSupplier" entity-name="SupplierPriceType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_PRICEFROMSUPPLIER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP1_SUPPLIERPRICETYPE_PRICEFROMSUPPLIER_E_ID`"/> + </many-to-one> + <property name="simplePrice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`GROUP1_SIMPLEPRICE`"/> + </property> + </composite-element> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.SupplierPriceTypeImpl" entity-name="SupplierPriceType" abstract="false" lazy="false" discriminator-value="SupplierPriceType" table="`SUPPLIERPRICETYPE`"> + <meta attribute="eclassName" inherit="false">SupplierPriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERPRICETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.TranslatedDescriptionTypeImpl" entity-name="TranslatedDescriptionType" abstract="false" lazy="false" discriminator-value="TranslatedDescriptionType" table="`TRANSLATEDDESCRIPTIONTYPE`"> + <meta attribute="eclassName" inherit="false">TranslatedDescriptionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TRANSLATEDDESCRIPTIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="language" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LANGUAGE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5af952a97 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,13 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="featuremap.ProductClassificationObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + <param name="edatatype">ProductClassificationObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.PriceByQuantityTypeImpl" entity-name="PriceByQuantityType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="PriceByQuantityType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ProductType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.SupplierPriceTypeImpl" entity-name="SupplierPriceType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SupplierPriceType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.TranslatedDescriptionTypeImpl" entity-name="TranslatedDescriptionType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TranslatedDescriptionType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5af952a97 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.elist/FeatureMapEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,13 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="featuremap.ProductClassificationObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/store/test/emf/elist/featuremap</param> + <param name="edatatype">ProductClassificationObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.PriceByQuantityTypeImpl" entity-name="PriceByQuantityType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="PriceByQuantityType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ProductType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.SupplierPriceTypeImpl" entity-name="SupplierPriceType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SupplierPriceType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.elist.featuremap.impl.TranslatedDescriptionTypeImpl" entity-name="TranslatedDescriptionType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TranslatedDescriptionType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/AccountingTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/AccountingTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..713b1f28f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/AccountingTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,228 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.AccountImpl" entity-name="Account" abstract="true" lazy="false" table="`ACCOUNT`"> + <meta attribute="eclassName" inherit="false">Account</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.AccountGroupImpl" entity-name="AccountGroup" abstract="false" lazy="false" table="`ACCOUNTGROUP`"> + <meta attribute="eclassName" inherit="false">AccountGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="account" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTGROUP_ACCOUNT"> + <column name="`ACCOUNTGROUP_ACCOUNT_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTGROUP_ACCOUNT_IDX`"/> + <one-to-many entity-name="Account"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.AccountingImpl" entity-name="Accounting" abstract="false" lazy="false" table="`ACCOUNTING`"> + <meta attribute="eclassName" inherit="false">Accounting</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="accountGroup" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTING_ACCOUNTGROUP"> + <column name="`ACCOUNTING_ACCOUNTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTING_ACCOUNTGROUP_IDX`"/> + <one-to-many entity-name="AccountGroup"/> + </list> + <list name="vat" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTING_VAT"> + <column name="`ACCOUNTING_VAT_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTING_VAT_IDX`"/> + <one-to-many entity-name="Vat"/> + </list> + <many-to-one name="vatAccount" entity-name="BalanceAccount" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ACCOUNTING_VATACCOUNT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BALANCEACCOUNT_VATACCOUNT_E_ID`"/> + </many-to-one> + <many-to-one name="report" entity-name="Report" lazy="false" cascade="all" foreign-key="ACCOUNTING_REPORT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`REPORT_REPORT_E_ID`"/> + </many-to-one> + <list name="journalGroup" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTING_JOURNALGROUP"> + <column name="`ACCOUNTING_JOURNALGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTING_JOURNALGROUP_IDX`"/> + <one-to-many entity-name="JournalGroup"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.BalanceAccountImpl" entity-name="BalanceAccount" abstract="false" lazy="false" extends="Account" table="`BALANCEACCOUNT`"> + <meta attribute="eclassName" inherit="false">BalanceAccount</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <key> + <column name="`ACCOUNT_E_ID`"/> + </key> + <list name="report" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`BALANCEACCOUNT_REPORTGROUP`"> + <key update="true"> + <column name="`BALANCEACCOUNT_E_ID`" unique="false"/> + </key> + <list-index column="`BALANCEACCOUNT_REPORT_IDX`"/> + <many-to-many entity-name="ReportGroup" unique="false" foreign-key="BALANCEACCOUNT_REPORT"> + <column name="`REPORTGROUP_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.JournalGroupImpl" entity-name="JournalGroup" abstract="false" lazy="false" table="`JOURNALGROUP`"> + <meta attribute="eclassName" inherit="false">JournalGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="journalGroups" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="JOURNALGROUP_JOURNALGROUPS"> + <column name="`JOURNALGROUP_JOURNALGROUPS_E_ID`" unique="false"/> + </key> + <list-index column="`JOURNALGROUP_JOURNALGROUPS_IDX`"/> + <one-to-many entity-name="JournalGroup"/> + </list> + <list name="journalStatements" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="JOURNALGROUP_JOURNALSTATEMENTS"> + <column name="`JOURNALGROUP_JOURNALSTATEMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`JOURNALGROUP_JOURNALSTATEMENTS_IDX`"/> + <one-to-many entity-name="JournalStatement"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.JournalStatementImpl" entity-name="JournalStatement" abstract="false" lazy="false" table="`JOURNALSTATEMENT`"> + <meta attribute="eclassName" inherit="false">JournalStatement</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="date" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`DATE`"/> + </property> + <property name="amount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`AMOUNT`"/> + </property> + <many-to-one name="debitAccount" entity-name="Account" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="JOURNALSTATEMENT_DEBITACCOUNT" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`ACCOUNT_DEBITACCOUNT_E_ID`"/> + </many-to-one> + <many-to-one name="creditAccount" entity-name="Account" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="JOURNALSTATEMENT_CREDITACCOUNT" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`ACCOUNT_CREDITACCOUNT_E_ID`"/> + </many-to-one> + <many-to-one name="vat" entity-name="Vat" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="JOURNALSTATEMENT_VAT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VAT_VAT_E_ID`"/> + </many-to-one> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.PLAccountImpl" entity-name="PLAccount" abstract="false" lazy="false" extends="Account" table="`PLACCOUNT`"> + <meta attribute="eclassName" inherit="false">PLAccount</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <key> + <column name="`ACCOUNT_E_ID`"/> + </key> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.ReportImpl" entity-name="Report" abstract="false" lazy="false" table="`REPORT`"> + <meta attribute="eclassName" inherit="false">Report</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="debitReportGroup" entity-name="ReportGroup" lazy="false" cascade="all" foreign-key="REPORT_DEBITREPORTGROUP" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`REPORTGROUP_DEBITREPORTGROUP_E_ID`"/> + </many-to-one> + <many-to-one name="creditReportGroup" entity-name="ReportGroup" lazy="false" cascade="all" foreign-key="REPORT_CREDITREPORTGROUP" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`REPORTGROUP_CREDITREPORTGROUP_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.ReportGroupImpl" entity-name="ReportGroup" abstract="false" lazy="false" table="`REPORTGROUP`"> + <meta attribute="eclassName" inherit="false">ReportGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="reportGroup" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="REPORTGROUP_REPORTGROUP"> + <column name="`REPORTGROUP_REPORTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`REPORTGROUP_REPORTGROUP_IDX`"/> + <one-to-many entity-name="ReportGroup"/> + </list> + <list name="account" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`REPORTGROUP_BALANCEACCOUNT`"> + <key update="true"> + <column name="`REPORTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`REPORTGROUP_ACCOUNT_IDX`"/> + <many-to-many entity-name="BalanceAccount" unique="false" foreign-key="REPORTGROUP_ACCOUNT"> + <column name="`BALANCEACCOUNT_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.VatImpl" entity-name="Vat" abstract="false" lazy="false" table="`VAT`"> + <meta attribute="eclassName" inherit="false">Vat</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="rate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`RATE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/AccountingTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/AccountingTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cd38b756f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/AccountingTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,246 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.AccountImpl" entity-name="Account" abstract="true" lazy="false" discriminator-value="Account" table="`ACCOUNT`"> + <meta attribute="eclassName" inherit="false">Account</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ACCOUNTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.AccountGroupImpl" entity-name="AccountGroup" abstract="false" lazy="false" discriminator-value="AccountGroup" table="`ACCOUNTGROUP`"> + <meta attribute="eclassName" inherit="false">AccountGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ACCOUNTGROUPDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="account" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTGROUP_ACCOUNT"> + <column name="`ACCOUNTGROUP_ACCOUNT_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTGROUP_ACCOUNT_IDX`"/> + <one-to-many entity-name="Account"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.AccountingImpl" entity-name="Accounting" abstract="false" lazy="false" discriminator-value="Accounting" table="`ACCOUNTING`"> + <meta attribute="eclassName" inherit="false">Accounting</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ACCOUNTINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="accountGroup" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTING_ACCOUNTGROUP"> + <column name="`ACCOUNTING_ACCOUNTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTING_ACCOUNTGROUP_IDX`"/> + <one-to-many entity-name="AccountGroup"/> + </list> + <list name="vat" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTING_VAT"> + <column name="`ACCOUNTING_VAT_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTING_VAT_IDX`"/> + <one-to-many entity-name="Vat"/> + </list> + <many-to-one name="vatAccount" entity-name="BalanceAccount" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ACCOUNTING_VATACCOUNT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BALANCEACCOUNT_VATACCOUNT_E_ID`"/> + </many-to-one> + <many-to-one name="report" entity-name="Report" lazy="false" cascade="all" foreign-key="ACCOUNTING_REPORT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`REPORT_REPORT_E_ID`"/> + </many-to-one> + <list name="journalGroup" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACCOUNTING_JOURNALGROUP"> + <column name="`ACCOUNTING_JOURNALGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ACCOUNTING_JOURNALGROUP_IDX`"/> + <one-to-many entity-name="JournalGroup"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.BalanceAccountImpl" entity-name="BalanceAccount" abstract="false" lazy="false" extends="Account" discriminator-value="BalanceAccount"> + <meta attribute="eclassName" inherit="false">BalanceAccount</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <list name="report" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`BALANCEACCOUNT_REPORTGROUP`"> + <key update="true"> + <column name="`BALANCEACCOUNT_E_ID`" unique="false"/> + </key> + <list-index column="`BALANCEACCOUNT_REPORT_IDX`"/> + <many-to-many entity-name="ReportGroup" unique="false" foreign-key="BALANCEACCOUNT_REPORT"> + <column name="`REPORTGROUP_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.JournalGroupImpl" entity-name="JournalGroup" abstract="false" lazy="false" discriminator-value="JournalGroup" table="`JOURNALGROUP`"> + <meta attribute="eclassName" inherit="false">JournalGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="JOURNALGROUPDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="journalGroups" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="JOURNALGROUP_JOURNALGROUPS"> + <column name="`JOURNALGROUP_JOURNALGROUPS_E_ID`" unique="false"/> + </key> + <list-index column="`JOURNALGROUP_JOURNALGROUPS_IDX`"/> + <one-to-many entity-name="JournalGroup"/> + </list> + <list name="journalStatements" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="JOURNALGROUP_JOURNALSTATEMENTS"> + <column name="`JOURNALGROUP_JOURNALSTATEMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`JOURNALGROUP_JOURNALSTATEMENTS_IDX`"/> + <one-to-many entity-name="JournalStatement"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.JournalStatementImpl" entity-name="JournalStatement" abstract="false" lazy="false" discriminator-value="JournalStatement" table="`JOURNALSTATEMENT`"> + <meta attribute="eclassName" inherit="false">JournalStatement</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="JOURNALSTATEMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="date" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`DATE`"/> + </property> + <property name="amount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`AMOUNT`"/> + </property> + <many-to-one name="debitAccount" entity-name="Account" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="JOURNALSTATEMENT_DEBITACCOUNT" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`ACCOUNT_DEBITACCOUNT_E_ID`"/> + </many-to-one> + <many-to-one name="creditAccount" entity-name="Account" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="JOURNALSTATEMENT_CREDITACCOUNT" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`ACCOUNT_CREDITACCOUNT_E_ID`"/> + </many-to-one> + <many-to-one name="vat" entity-name="Vat" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="JOURNALSTATEMENT_VAT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VAT_VAT_E_ID`"/> + </many-to-one> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.PLAccountImpl" entity-name="PLAccount" abstract="false" lazy="false" extends="Account" discriminator-value="PLAccount"> + <meta attribute="eclassName" inherit="false">PLAccount</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.ReportImpl" entity-name="Report" abstract="false" lazy="false" discriminator-value="Report" table="`REPORT`"> + <meta attribute="eclassName" inherit="false">Report</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="REPORTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="debitReportGroup" entity-name="ReportGroup" lazy="false" cascade="all" foreign-key="REPORT_DEBITREPORTGROUP" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`REPORTGROUP_DEBITREPORTGROUP_E_ID`"/> + </many-to-one> + <many-to-one name="creditReportGroup" entity-name="ReportGroup" lazy="false" cascade="all" foreign-key="REPORT_CREDITREPORTGROUP" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`REPORTGROUP_CREDITREPORTGROUP_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.ReportGroupImpl" entity-name="ReportGroup" abstract="false" lazy="false" discriminator-value="ReportGroup" table="`REPORTGROUP`"> + <meta attribute="eclassName" inherit="false">ReportGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="REPORTGROUPDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="reportGroup" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="REPORTGROUP_REPORTGROUP"> + <column name="`REPORTGROUP_REPORTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`REPORTGROUP_REPORTGROUP_IDX`"/> + <one-to-many entity-name="ReportGroup"/> + </list> + <list name="account" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`REPORTGROUP_BALANCEACCOUNT`"> + <key update="true"> + <column name="`REPORTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`REPORTGROUP_ACCOUNT_IDX`"/> + <many-to-many entity-name="BalanceAccount" unique="false" foreign-key="REPORTGROUP_ACCOUNT"> + <column name="`BALANCEACCOUNT_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.accounting.impl.VatImpl" entity-name="Vat" abstract="false" lazy="false" discriminator-value="Vat" table="`VAT`"> + <meta attribute="eclassName" inherit="false">Vat</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/accounting</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="VATDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="rate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`RATE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/Bz292973$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/Bz292973$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..a3b29b7a6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/Bz292973$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,91 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`" length="50"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/Bz292973$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/Bz292973$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cd24dd90d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/Bz292973$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,100 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`" length="50"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CapaTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CapaTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..91820a236 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CapaTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,165 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.CapacityEntryImpl" entity-name="CapacityEntry" abstract="false" lazy="false" table="`CAPACITYENTRY`"> + <meta attribute="eclassName" inherit="false">CapacityEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="capacityEntryId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CAPACITYENTRYID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.MachineImpl" entity-name="Machine" abstract="false" lazy="false" table="`MACHINE`"> + <meta attribute="eclassName" inherit="false">Machine</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="workWeek" entity-name="WorkWeek" lazy="false" cascade="all" foreign-key="MACHINE_WORKWEEK" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`WORKWEEK_WORKWEEK_E_ID`"/> + </many-to-one> + <property name="machineId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MACHINEID`"/> + </property> + <property name="machineSearchString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MACHINESEARCHSTRING`"/> + </property> + <property name="multiplicity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MULTIPLICITY`"/> + </property> + <property name="taskSearchString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TASKSEARCHSTRING`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.MachineListImpl" entity-name="MachineList" abstract="false" lazy="false" table="`MACHINELIST`"> + <meta attribute="eclassName" inherit="false">MachineList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="machines" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MACHINELIST_MACHINES"> + <column name="`MACHINELIST_MACHINES_E_ID`" unique="false"/> + </key> + <list-index column="`MACHINELIST_MACHINES_IDX`"/> + <one-to-many entity-name="Machine"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.ProductionImpl" entity-name="Production" abstract="false" lazy="false" table="`PRODUCTION`"> + <meta attribute="eclassName" inherit="false">Production</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="article" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ARTICLE`"/> + </property> + <property name="dueTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`DUETIME`"/> + </property> + <property name="missingAmount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`MISSINGAMOUNT`"/> + </property> + <property name="productionId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PRODUCTIONID`"/> + </property> + <property name="startTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`STARTTIME`"/> + </property> + <property name="totalAmount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`TOTALAMOUNT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.TaskImpl" entity-name="Task" abstract="false" lazy="false" table="`TASK`"> + <meta attribute="eclassName" inherit="false">Task</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="capacityEntry" entity-name="CapacityEntry" lazy="false" cascade="all" foreign-key="TASK_CAPACITYENTRY" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`CAPACITYENTRY_CAPACITYENTRY_E_ID`"/> + </many-to-one> + <many-to-one name="production" entity-name="Production" lazy="false" cascade="all" foreign-key="TASK_PRODUCTION" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PRODUCTION_PRODUCTION_E_ID`"/> + </many-to-one> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="taskId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TASKID`"/> + </property> + <property name="timePerPice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`TIMEPERPICE`"/> + </property> + <property name="timePerPreperation" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`TIMEPERPREPERATION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.WorkDayImpl" entity-name="WorkDay" abstract="false" lazy="false" table="`WORKDAY`"> + <meta attribute="eclassName" inherit="false">WorkDay</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="dayOfWeek" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`DAYOFWEEK`"/> + </property> + <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`DURATION`"/> + </property> + <property name="startTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`STARTTIME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.WorkWeekImpl" entity-name="WorkWeek" abstract="false" lazy="false" table="`WORKWEEK`"> + <meta attribute="eclassName" inherit="false">WorkWeek</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="days" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="WORKWEEK_DAYS"> + <column name="`WORKWEEK_DAYS_E_ID`" unique="false"/> + </key> + <list-index column="`WORKWEEK_DAYS_IDX`"/> + <one-to-many entity-name="WorkDay"/> + </list> + <property name="workWeekId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`WORKWEEKID`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CapaTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CapaTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..37f587a73 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CapaTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,186 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.CapacityEntryImpl" entity-name="CapacityEntry" abstract="false" lazy="false" discriminator-value="CapacityEntry" table="`CAPACITYENTRY`"> + <meta attribute="eclassName" inherit="false">CapacityEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CAPACITYENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="capacityEntryId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CAPACITYENTRYID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.MachineImpl" entity-name="Machine" abstract="false" lazy="false" discriminator-value="Machine" table="`MACHINE`"> + <meta attribute="eclassName" inherit="false">Machine</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MACHINEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="workWeek" entity-name="WorkWeek" lazy="false" cascade="all" foreign-key="MACHINE_WORKWEEK" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`WORKWEEK_WORKWEEK_E_ID`"/> + </many-to-one> + <property name="machineId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MACHINEID`"/> + </property> + <property name="machineSearchString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MACHINESEARCHSTRING`"/> + </property> + <property name="multiplicity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MULTIPLICITY`"/> + </property> + <property name="taskSearchString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TASKSEARCHSTRING`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.MachineListImpl" entity-name="MachineList" abstract="false" lazy="false" discriminator-value="MachineList" table="`MACHINELIST`"> + <meta attribute="eclassName" inherit="false">MachineList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MACHINELISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="machines" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MACHINELIST_MACHINES"> + <column name="`MACHINELIST_MACHINES_E_ID`" unique="false"/> + </key> + <list-index column="`MACHINELIST_MACHINES_IDX`"/> + <one-to-many entity-name="Machine"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.ProductionImpl" entity-name="Production" abstract="false" lazy="false" discriminator-value="Production" table="`PRODUCTION`"> + <meta attribute="eclassName" inherit="false">Production</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="article" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ARTICLE`"/> + </property> + <property name="dueTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`DUETIME`"/> + </property> + <property name="missingAmount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`MISSINGAMOUNT`"/> + </property> + <property name="productionId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PRODUCTIONID`"/> + </property> + <property name="startTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`STARTTIME`"/> + </property> + <property name="totalAmount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`TOTALAMOUNT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.TaskImpl" entity-name="Task" abstract="false" lazy="false" discriminator-value="Task" table="`TASK`"> + <meta attribute="eclassName" inherit="false">Task</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TASKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="capacityEntry" entity-name="CapacityEntry" lazy="false" cascade="all" foreign-key="TASK_CAPACITYENTRY" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`CAPACITYENTRY_CAPACITYENTRY_E_ID`"/> + </many-to-one> + <many-to-one name="production" entity-name="Production" lazy="false" cascade="all" foreign-key="TASK_PRODUCTION" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PRODUCTION_PRODUCTION_E_ID`"/> + </many-to-one> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="taskId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TASKID`"/> + </property> + <property name="timePerPice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`TIMEPERPICE`"/> + </property> + <property name="timePerPreperation" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`TIMEPERPREPERATION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.WorkDayImpl" entity-name="WorkDay" abstract="false" lazy="false" discriminator-value="WorkDay" table="`WORKDAY`"> + <meta attribute="eclassName" inherit="false">WorkDay</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WORKDAYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="dayOfWeek" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`DAYOFWEEK`"/> + </property> + <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`DURATION`"/> + </property> + <property name="startTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`STARTTIME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.capa.impl.WorkWeekImpl" entity-name="WorkWeek" abstract="false" lazy="false" discriminator-value="WorkWeek" table="`WORKWEEK`"> + <meta attribute="eclassName" inherit="false">WorkWeek</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/capa</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WORKWEEKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="days" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="WORKWEEK_DAYS"> + <column name="`WORKWEEK_DAYS_E_ID`" unique="false"/> + </key> + <list-index column="`WORKWEEK_DAYS_IDX`"/> + <one-to-many entity-name="WorkDay"/> + </list> + <property name="workWeekId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`WORKWEEKID`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CatalogTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CatalogTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2f9a27018 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CatalogTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,111 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.CatalogTypeImpl" entity-name="CatalogType" abstract="false" lazy="false" table="`CATALOGTYPE`"> + <meta attribute="eclassName" inherit="false">CatalogType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="subCatalog" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_SUBCATALOG"> + <column name="`CATALOGTYPE_SUBCATALOG_NAME`" unique="false"/> + </key> + <list-index column="`CATALOGTYPE_SUBCATALOG_IDX`"/> + <one-to-many entity-name="CatalogType"/> + </list> + <list name="product" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_PRODUCT"> + <column name="`CATALOGTYPE_PRODUCT_NAME`" unique="false"> + <comment>My product</comment> + </column> + </key> + <list-index column="`CATALOGTYPE_PRODUCT_IDX`"/> + <one-to-many entity-name="ProductType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.PriceTypeImpl" entity-name="PriceType" abstract="false" lazy="false" table="`PRICETYPE`"> + <meta attribute="eclassName" inherit="false">PriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantityTo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITYTO`"/> + </property> + <many-to-one name="supplier" entity-name="SupplierType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRICETYPE_SUPPLIER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SUPPLIERTYPE_SUPPLIER_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <comment>My product</comment> + <id name="code" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"> + <comment>My descrip</comment> + </column> + </property> + <list name="remark" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PRODUCTTYPE_REMARK"> + <column name="`PRODUCTTYPE_REMARK_CODE`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_REMARK_IDX`"/> + <one-to-many entity-name="StringType"/> + </list> + <many-to-one name="price" entity-name="PriceType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PRICETYPE_PRICE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.StringTypeImpl" entity-name="StringType" abstract="false" lazy="false" table="`STRINGTYPE`"> + <meta attribute="eclassName" inherit="false">StringType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" table="`SUPPLIERTYPE`"> + <meta attribute="eclassName" inherit="false">SupplierType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="noOfEmployees" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NOOFEMPLOYEES`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CatalogTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CatalogTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..e80500f52 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/CatalogTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,126 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.CatalogTypeImpl" entity-name="CatalogType" abstract="false" lazy="false" discriminator-value="CatalogType" table="`CATALOGTYPE`"> + <meta attribute="eclassName" inherit="false">CatalogType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CATALOGTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="subCatalog" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_SUBCATALOG"> + <column name="`CATALOGTYPE_SUBCATALOG_NAME`" unique="false"/> + </key> + <list-index column="`CATALOGTYPE_SUBCATALOG_IDX`"/> + <one-to-many entity-name="CatalogType"/> + </list> + <list name="product" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_PRODUCT"> + <column name="`CATALOGTYPE_PRODUCT_NAME`" unique="false"> + <comment>My product</comment> + </column> + </key> + <list-index column="`CATALOGTYPE_PRODUCT_IDX`"/> + <one-to-many entity-name="ProductType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.PriceTypeImpl" entity-name="PriceType" abstract="false" lazy="false" discriminator-value="PriceType" table="`PRICETYPE`"> + <meta attribute="eclassName" inherit="false">PriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRICETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantityTo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITYTO`"/> + </property> + <many-to-one name="supplier" entity-name="SupplierType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRICETYPE_SUPPLIER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SUPPLIERTYPE_SUPPLIER_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" discriminator-value="ProductType" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <comment>My product</comment> + <id name="code" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"> + <comment>My descrip</comment> + </column> + </property> + <list name="remark" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PRODUCTTYPE_REMARK"> + <column name="`PRODUCTTYPE_REMARK_CODE`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_REMARK_IDX`"/> + <one-to-many entity-name="StringType"/> + </list> + <many-to-one name="price" entity-name="PriceType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PRICETYPE_PRICE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.StringTypeImpl" entity-name="StringType" abstract="false" lazy="false" discriminator-value="StringType" table="`STRINGTYPE`"> + <meta attribute="eclassName" inherit="false">StringType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" discriminator-value="SupplierType" table="`SUPPLIERTYPE`"> + <meta attribute="eclassName" inherit="false">SupplierType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="noOfEmployees" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NOOFEMPLOYEES`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DetachFromSessionAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DetachFromSessionAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DetachFromSessionAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DetachFromSessionAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DetachFromSessionAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DetachFromSessionAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..85acd8746 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,42 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" table="`PERSON`" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/dynamic</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="group" table="`PERSON_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSON_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_GROUP_IDX`"/> + <one-to-many entity-name="Person_group"/> + </list> + </class> + <class entity-name="Person_group" lazy="false" table="`PERSON_GROUP`"> + <meta attribute="featureMap" inherit="false">Person</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_AGE`"/> + </property> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_LENGTH`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..884d11670 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,45 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" discriminator-value="Person" table="`PERSON`" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/dynamic</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="group" table="`PERSON_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSON_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_GROUP_IDX`"/> + <one-to-many entity-name="Person_group"/> + </list> + </class> + <class entity-name="Person_group" lazy="false" table="`PERSON_GROUP`"> + <meta attribute="featureMap" inherit="false">Person</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_AGE`"/> + </property> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_LENGTH`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..eaade9a66 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,11 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Person" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Employee" abstract="false" lazy="true" extends="Person" discriminator-value="Employee" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="SpecialEmployee" abstract="false" lazy="true" extends="Employee" discriminator-value="SpecialEmployee" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"/> + <subclass entity-name="Department" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Department" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"/> + <subclass entity-name="Office" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Office" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"/> + <subclass entity-name="Address" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Address" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..eaade9a66 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,11 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Person" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Employee" abstract="false" lazy="true" extends="Person" discriminator-value="Employee" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="SpecialEmployee" abstract="false" lazy="true" extends="Employee" discriminator-value="SpecialEmployee" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"/> + <subclass entity-name="Department" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Department" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"/> + <subclass entity-name="Office" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Office" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"/> + <subclass entity-name="Address" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Address" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVNoDBSchemaAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVNoDBSchemaAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..a4d1c780d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVNoDBSchemaAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,6 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Person" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVNoDBSchemaAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVNoDBSchemaAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a4d1c780d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEAVNoDBSchemaAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,6 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Person" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEmbeddedIdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEmbeddedIdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3362d8c85 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEmbeddedIdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="Person" abstract="false" lazy="false" name="org.eclipse.emf.ecore.impl.DynamicEObjectImpl" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.emf.sample.DynamicEmbeddedIdAction</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.hibernate.mapping.SerializableDynamicEObjectImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.emf.sample.DynamicEmbeddedIdAction</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEmbeddedIdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEmbeddedIdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..13f49a152 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicEmbeddedIdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,25 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="Person" abstract="false" lazy="false" name="org.eclipse.emf.ecore.impl.DynamicEObjectImpl" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.emf.sample.DynamicEmbeddedIdAction</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.hibernate.mapping.SerializableDynamicEObjectImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.emf.sample.DynamicEmbeddedIdAction</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicNoDbSchemaUpdateAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicNoDbSchemaUpdateAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ae7c63d80 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicNoDbSchemaUpdateAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,127 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" table="`PERSON`" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/dynamic</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="group" table="`PERSON_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSON_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_GROUP_IDX`"/> + <one-to-many entity-name="Person_group"/> + </list> + </class> + <class entity-name="Person_group" lazy="false" table="`PERSON_GROUP`"> + <meta attribute="featureMap" inherit="false">Person</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_AGE`"/> + </property> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_LENGTH`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Employee" abstract="false" lazy="true" extends="Person" table="`EMPLOYEE`" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <key> + <column name="`PERSON_E_ID`"/> + </key> + <property name="manager" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MANAGER`"/> + </property> + <many-to-one name="department" entity-name="Department" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="EMPLOYEE_DEPARTMENT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`DEPARTMENT_DEPARTMENT_E_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="SpecialEmployee" abstract="false" lazy="true" extends="Employee" table="`SPECIALEMPLOYEE`" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"> + <meta attribute="eclassName" inherit="false">SpecialEmployee</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <key> + <column name="`EMPLOYEE_E_ID`"/> + </key> + <list name="offices" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="SPECIALEMPLOYEE_OFFICES"> + <column name="`SPECIALEMPLOYEE_OFFICES_E_ID`" unique="false"/> + </key> + <list-index column="`SPECIALEMPLOYEE_OFFICES_IDX`"/> + <one-to-many entity-name="Office"/> + </list> + </joined-subclass> + <class entity-name="Department" abstract="false" lazy="true" table="`DEPARTMENT`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Department</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="manager" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DEPARTMENT_MANAGER"> + <column name="`DEPARTMENT_MANAGER_E_ID`" unique="false"/> + </key> + <list-index column="`DEPARTMENT_MANAGER_IDX`"/> + <one-to-many entity-name="Employee"/> + </list> + <many-to-one name="office" entity-name="Office" lazy="proxy" cascade="all" foreign-key="DEPARTMENT_OFFICE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OFFICE_OFFICE_NAME`"/> + </many-to-one> + <property name="departmentType" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`DEPARTMENTTYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.DynamicENumUserType"> + <param name="eclassifier">DepartmentType</param> + <param name="epackage">http:///www.elver.org/DynamicTest</param> + </type> + </property> + </class> + <class entity-name="Office" abstract="false" lazy="true" table="`OFFICE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Office</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="address" entity-name="Address" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="OFFICE_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + </class> + <class entity-name="Address" abstract="false" lazy="true" table="`ADDRESS`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicNoDbSchemaUpdateAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicNoDbSchemaUpdateAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..94a6b1bc3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/DynamicNoDbSchemaUpdateAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,133 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Person" abstract="false" lazy="true" discriminator-value="Person" table="`PERSON`" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/dynamic</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="group" table="`PERSON_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSON_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_GROUP_IDX`"/> + <one-to-many entity-name="Person_group"/> + </list> + </class> + <class entity-name="Person_group" lazy="false" table="`PERSON_GROUP`"> + <meta attribute="featureMap" inherit="false">Person</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_AGE`"/> + </property> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`GROUP_LENGTH`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="Employee" abstract="false" lazy="true" extends="Person" discriminator-value="Employee" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <property name="manager" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MANAGER`"/> + </property> + <many-to-one name="department" entity-name="Department" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="EMPLOYEE_DEPARTMENT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`DEPARTMENT_DEPARTMENT_E_ID`"/> + </many-to-one> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl" entity-name="SpecialEmployee" abstract="false" lazy="true" extends="Employee" discriminator-value="SpecialEmployee" proxy="org.eclipse.emf.teneo.samples.emf.sample.dynamic.impl.PersonImpl"> + <meta attribute="eclassName" inherit="false">SpecialEmployee</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <list name="offices" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="SPECIALEMPLOYEE_OFFICES"> + <column name="`SPECIALEMPLOYEE_OFFICES_E_ID`" unique="false"/> + </key> + <list-index column="`SPECIALEMPLOYEE_OFFICES_IDX`"/> + <one-to-many entity-name="Office"/> + </list> + </subclass> + <class entity-name="Department" abstract="false" lazy="true" discriminator-value="Department" table="`DEPARTMENT`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Department</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DEPARTMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="manager" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DEPARTMENT_MANAGER"> + <column name="`DEPARTMENT_MANAGER_E_ID`" unique="false"/> + </key> + <list-index column="`DEPARTMENT_MANAGER_IDX`"/> + <one-to-many entity-name="Employee"/> + </list> + <many-to-one name="office" entity-name="Office" lazy="proxy" cascade="all" foreign-key="DEPARTMENT_OFFICE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OFFICE_OFFICE_NAME`"/> + </many-to-one> + <property name="departmentType" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`DEPARTMENTTYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.DynamicENumUserType"> + <param name="eclassifier">DepartmentType</param> + <param name="epackage">http:///www.elver.org/DynamicTest</param> + </type> + </property> + </class> + <class entity-name="Office" abstract="false" lazy="true" discriminator-value="Office" table="`OFFICE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Office</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="OFFICEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="address" entity-name="Address" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="OFFICE_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + </class> + <class entity-name="Address" abstract="false" lazy="true" discriminator-value="Address" table="`ADDRESS`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/DynamicTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EcoreEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EcoreEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..518d0e3bc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EcoreEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,116 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="ecore.EDiagnosticChain" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EDiagnosticChain</param> + </typedef> + <typedef name="ecore.EEList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EEList</param> + </typedef> + <typedef name="ecore.EEnumerator" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EEnumerator</param> + </typedef> + <typedef name="ecore.EFeatureMap" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EFeatureMap</param> + </typedef> + <typedef name="ecore.EFeatureMapEntry" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EFeatureMapEntry</param> + </typedef> + <typedef name="ecore.EJavaClass" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EJavaClass</param> + </typedef> + <typedef name="ecore.EMap" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EMap</param> + </typedef> + <typedef name="ecore.EResource" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EResource</param> + </typedef> + <typedef name="ecore.EResourceSet" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EResourceSet</param> + </typedef> + <typedef name="ecore.ETreeIterator" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">ETreeIterator</param> + </typedef> + <typedef name="ecore.EInvocationTargetException" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EInvocationTargetException</param> + </typedef> + <typedef name="type.Duration" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">Duration</param> + </typedef> + <typedef name="type.ENTITIES" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">ENTITIES</param> + </typedef> + <typedef name="type.ENTITIESBase" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">ENTITIESBase</param> + </typedef> + <typedef name="type.IDREFS" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">IDREFS</param> + </typedef> + <typedef name="type.IDREFSBase" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">IDREFSBase</param> + </typedef> + <typedef name="type.NMTOKENS" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">NMTOKENS</param> + </typedef> + <typedef name="type.NMTOKENSBase" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">NMTOKENSBase</param> + </typedef> + <typedef name="type.NOTATION" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">NOTATION</param> + </typedef> + <typedef name="type.QName" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">QName</param> + </typedef> + <typedef name="type.ShortObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">ShortObject</param> + </typedef> + <typedef name="type.UnsignedByteObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">UnsignedByteObject</param> + </typedef> + <subclass name="org.eclipse.emf.ecore.impl.EModelElementImpl" entity-name="EModelElement" abstract="true" lazy="false" extends="EAV_EObject" discriminator-value="EModelElement"/> + <subclass name="org.eclipse.emf.ecore.impl.ENamedElementImpl" entity-name="ENamedElement" abstract="true" lazy="false" extends="EModelElement" discriminator-value="ENamedElement"/> + <subclass name="org.eclipse.emf.ecore.impl.ETypedElementImpl" entity-name="ETypedElement" abstract="true" lazy="false" extends="ENamedElement" discriminator-value="ETypedElement"/> + <subclass name="org.eclipse.emf.ecore.impl.EStructuralFeatureImpl" entity-name="EStructuralFeature" abstract="true" lazy="false" extends="ETypedElement" discriminator-value="EStructuralFeature"/> + <subclass name="org.eclipse.emf.ecore.impl.EAttributeImpl" entity-name="EAttribute" abstract="false" lazy="false" extends="EStructuralFeature" discriminator-value="EAttribute"/> + <subclass name="org.eclipse.emf.ecore.impl.EAnnotationImpl" entity-name="EAnnotation" abstract="false" lazy="false" extends="EModelElement" discriminator-value="EAnnotation"/> + <subclass name="org.eclipse.emf.ecore.impl.EClassifierImpl" entity-name="EClassifier" abstract="true" lazy="false" extends="ENamedElement" discriminator-value="EClassifier"/> + <subclass name="org.eclipse.emf.ecore.impl.EClassImpl" entity-name="EClass" abstract="false" lazy="false" extends="EClassifier" discriminator-value="EClass"/> + <subclass name="org.eclipse.emf.ecore.impl.EDataTypeImpl" entity-name="EDataType" abstract="false" lazy="false" extends="EClassifier" discriminator-value="EDataType"/> + <subclass name="org.eclipse.emf.ecore.impl.EEnumImpl" entity-name="EEnum" abstract="false" lazy="false" extends="EDataType" discriminator-value="EEnum"/> + <subclass name="org.eclipse.emf.ecore.impl.EEnumLiteralImpl" entity-name="EEnumLiteral" abstract="false" lazy="false" extends="ENamedElement" discriminator-value="EEnumLiteral"/> + <subclass name="org.eclipse.emf.ecore.impl.EFactoryImpl" entity-name="EFactory" abstract="false" lazy="false" extends="EModelElement" discriminator-value="EFactory"/> + <subclass name="org.eclipse.emf.ecore.impl.BasicEObjectImpl" entity-name="ecore_EObject" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ecore_EObject"/> + <subclass name="org.eclipse.emf.ecore.impl.EOperationImpl" entity-name="EOperation" abstract="false" lazy="false" extends="ETypedElement" discriminator-value="EOperation"/> + <subclass name="org.eclipse.emf.ecore.impl.EPackageImpl" entity-name="EPackage" abstract="false" lazy="false" extends="ENamedElement" discriminator-value="EPackage"/> + <subclass name="org.eclipse.emf.ecore.impl.EParameterImpl" entity-name="EParameter" abstract="false" lazy="false" extends="ETypedElement" discriminator-value="EParameter"/> + <subclass name="org.eclipse.emf.ecore.impl.EReferenceImpl" entity-name="EReference" abstract="false" lazy="false" extends="EStructuralFeature" discriminator-value="EReference"/> + <subclass name="org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl" entity-name="EStringToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="EStringToStringMapEntry"/> + <subclass name="org.eclipse.emf.ecore.impl.EGenericTypeImpl" entity-name="EGenericType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="EGenericType"/> + <subclass name="org.eclipse.emf.ecore.impl.ETypeParameterImpl" entity-name="ETypeParameter" abstract="false" lazy="false" extends="ENamedElement" discriminator-value="ETypeParameter"/> + <subclass name="org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl" entity-name="AnyType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="AnyType"/> + <subclass name="org.eclipse.emf.ecore.xml.type.impl.ProcessingInstructionImpl" entity-name="ProcessingInstruction" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ProcessingInstruction"/> + <subclass name="org.eclipse.emf.ecore.xml.type.impl.SimpleAnyTypeImpl" entity-name="SimpleAnyType" abstract="false" lazy="false" extends="AnyType" discriminator-value="SimpleAnyType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EcoreEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EcoreEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..518d0e3bc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EcoreEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,116 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="ecore.EDiagnosticChain" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EDiagnosticChain</param> + </typedef> + <typedef name="ecore.EEList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EEList</param> + </typedef> + <typedef name="ecore.EEnumerator" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EEnumerator</param> + </typedef> + <typedef name="ecore.EFeatureMap" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EFeatureMap</param> + </typedef> + <typedef name="ecore.EFeatureMapEntry" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EFeatureMapEntry</param> + </typedef> + <typedef name="ecore.EJavaClass" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EJavaClass</param> + </typedef> + <typedef name="ecore.EMap" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EMap</param> + </typedef> + <typedef name="ecore.EResource" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EResource</param> + </typedef> + <typedef name="ecore.EResourceSet" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EResourceSet</param> + </typedef> + <typedef name="ecore.ETreeIterator" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">ETreeIterator</param> + </typedef> + <typedef name="ecore.EInvocationTargetException" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + <param name="edatatype">EInvocationTargetException</param> + </typedef> + <typedef name="type.Duration" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">Duration</param> + </typedef> + <typedef name="type.ENTITIES" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">ENTITIES</param> + </typedef> + <typedef name="type.ENTITIESBase" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">ENTITIESBase</param> + </typedef> + <typedef name="type.IDREFS" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">IDREFS</param> + </typedef> + <typedef name="type.IDREFSBase" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">IDREFSBase</param> + </typedef> + <typedef name="type.NMTOKENS" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">NMTOKENS</param> + </typedef> + <typedef name="type.NMTOKENSBase" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">NMTOKENSBase</param> + </typedef> + <typedef name="type.NOTATION" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">NOTATION</param> + </typedef> + <typedef name="type.QName" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">QName</param> + </typedef> + <typedef name="type.ShortObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">ShortObject</param> + </typedef> + <typedef name="type.UnsignedByteObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/2003/XMLType</param> + <param name="edatatype">UnsignedByteObject</param> + </typedef> + <subclass name="org.eclipse.emf.ecore.impl.EModelElementImpl" entity-name="EModelElement" abstract="true" lazy="false" extends="EAV_EObject" discriminator-value="EModelElement"/> + <subclass name="org.eclipse.emf.ecore.impl.ENamedElementImpl" entity-name="ENamedElement" abstract="true" lazy="false" extends="EModelElement" discriminator-value="ENamedElement"/> + <subclass name="org.eclipse.emf.ecore.impl.ETypedElementImpl" entity-name="ETypedElement" abstract="true" lazy="false" extends="ENamedElement" discriminator-value="ETypedElement"/> + <subclass name="org.eclipse.emf.ecore.impl.EStructuralFeatureImpl" entity-name="EStructuralFeature" abstract="true" lazy="false" extends="ETypedElement" discriminator-value="EStructuralFeature"/> + <subclass name="org.eclipse.emf.ecore.impl.EAttributeImpl" entity-name="EAttribute" abstract="false" lazy="false" extends="EStructuralFeature" discriminator-value="EAttribute"/> + <subclass name="org.eclipse.emf.ecore.impl.EAnnotationImpl" entity-name="EAnnotation" abstract="false" lazy="false" extends="EModelElement" discriminator-value="EAnnotation"/> + <subclass name="org.eclipse.emf.ecore.impl.EClassifierImpl" entity-name="EClassifier" abstract="true" lazy="false" extends="ENamedElement" discriminator-value="EClassifier"/> + <subclass name="org.eclipse.emf.ecore.impl.EClassImpl" entity-name="EClass" abstract="false" lazy="false" extends="EClassifier" discriminator-value="EClass"/> + <subclass name="org.eclipse.emf.ecore.impl.EDataTypeImpl" entity-name="EDataType" abstract="false" lazy="false" extends="EClassifier" discriminator-value="EDataType"/> + <subclass name="org.eclipse.emf.ecore.impl.EEnumImpl" entity-name="EEnum" abstract="false" lazy="false" extends="EDataType" discriminator-value="EEnum"/> + <subclass name="org.eclipse.emf.ecore.impl.EEnumLiteralImpl" entity-name="EEnumLiteral" abstract="false" lazy="false" extends="ENamedElement" discriminator-value="EEnumLiteral"/> + <subclass name="org.eclipse.emf.ecore.impl.EFactoryImpl" entity-name="EFactory" abstract="false" lazy="false" extends="EModelElement" discriminator-value="EFactory"/> + <subclass name="org.eclipse.emf.ecore.impl.BasicEObjectImpl" entity-name="ecore_EObject" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ecore_EObject"/> + <subclass name="org.eclipse.emf.ecore.impl.EOperationImpl" entity-name="EOperation" abstract="false" lazy="false" extends="ETypedElement" discriminator-value="EOperation"/> + <subclass name="org.eclipse.emf.ecore.impl.EPackageImpl" entity-name="EPackage" abstract="false" lazy="false" extends="ENamedElement" discriminator-value="EPackage"/> + <subclass name="org.eclipse.emf.ecore.impl.EParameterImpl" entity-name="EParameter" abstract="false" lazy="false" extends="ETypedElement" discriminator-value="EParameter"/> + <subclass name="org.eclipse.emf.ecore.impl.EReferenceImpl" entity-name="EReference" abstract="false" lazy="false" extends="EStructuralFeature" discriminator-value="EReference"/> + <subclass name="org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl" entity-name="EStringToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="EStringToStringMapEntry"/> + <subclass name="org.eclipse.emf.ecore.impl.EGenericTypeImpl" entity-name="EGenericType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="EGenericType"/> + <subclass name="org.eclipse.emf.ecore.impl.ETypeParameterImpl" entity-name="ETypeParameter" abstract="false" lazy="false" extends="ENamedElement" discriminator-value="ETypeParameter"/> + <subclass name="org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl" entity-name="AnyType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="AnyType"/> + <subclass name="org.eclipse.emf.ecore.xml.type.impl.ProcessingInstructionImpl" entity-name="ProcessingInstruction" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ProcessingInstruction"/> + <subclass name="org.eclipse.emf.ecore.xml.type.impl.SimpleAnyTypeImpl" entity-name="SimpleAnyType" abstract="false" lazy="false" extends="AnyType" discriminator-value="SimpleAnyType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EmployeeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EmployeeAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..0bdc59248 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EmployeeAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,63 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.employee.impl.DepartmentImpl" entity-name="Department" abstract="false" lazy="false" table="`DEPARTMENT`"> + <meta attribute="eclassName" inherit="false">Department</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="employees" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DEPARTMENT_EMPLOYEES"> + <column name="`DEPARTMENT_EMPLOYEES_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Employee"/> + <filter name="ageRange" condition="age between :fromAge and :toAge"/> + <filter name="salaryHigherThan" condition="salary > :salary"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.employee.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="salary" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`SALARY`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + <property name="hireDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`HIREDATE`"/> + </property> + <filter name="ageRange" condition="age between :fromAge and :toAge"/> + <filter name="salaryHigherThan" condition="salary > :salary"/> + <filter name="hireDate" condition="hireDate > :date"/> + </class> + <filter-def name="hireDate"> + <filter-param name="date" type="date"/> + </filter-def> + <filter-def name="ageRange"> + <filter-param name="fromAge" type="integer"/> + <filter-param name="toAge" type="integer"/> + </filter-def> + <filter-def name="salaryHigherThan"> + <filter-param name="salary" type="integer"/> + </filter-def> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EmployeeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EmployeeAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..db7ff8858 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/EmployeeAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,69 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.employee.impl.DepartmentImpl" entity-name="Department" abstract="false" lazy="false" discriminator-value="Department" table="`DEPARTMENT`"> + <meta attribute="eclassName" inherit="false">Department</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DEPARTMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="employees" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DEPARTMENT_EMPLOYEES"> + <column name="`DEPARTMENT_EMPLOYEES_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Employee"/> + <filter name="ageRange" condition="age between :fromAge and :toAge"/> + <filter name="salaryHigherThan" condition="salary > :salary"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.employee.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" discriminator-value="Employee" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMPLOYEEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="salary" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`SALARY`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + <property name="hireDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`HIREDATE`"/> + </property> + <filter name="ageRange" condition="age between :fromAge and :toAge"/> + <filter name="salaryHigherThan" condition="salary > :salary"/> + <filter name="hireDate" condition="hireDate > :date"/> + </class> + <filter-def name="hireDate"> + <filter-param name="date" type="date"/> + </filter-def> + <filter-def name="ageRange"> + <filter-param name="fromAge" type="integer"/> + <filter-param name="toAge" type="integer"/> + </filter-def> + <filter-def name="salaryHigherThan"> + <filter-param name="salary" type="integer"/> + </filter-def> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ExtendedPO2Test$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ExtendedPO2Test$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3eff41f5e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ExtendedPO2Test$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,197 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="order" entity-name="PurchaseOrder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_ORDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`ITEM_ORDER_E_ID`"/> + </many-to-one> + <property name="productName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PRODUCTNAME`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`QUANTITY`"/> + </property> + <property name="USPrice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`USPRICE`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="shipDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`SHIPDATE`"/> + </property> + <property name="partNum" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PARTNUM`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRY`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <key> + <column name="`ADDRESS_E_ID`"/> + </key> + <property name="street" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CITY`"/> + </property> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="items" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PURCHASEORDER_ITEMS"> + <column name="`ITEM_ORDER_E_ID`" unique="false"/> + </key> + <list-index column="`PURCHASEORDER_ITEMS_IDX`"/> + <one-to-many entity-name="Item"/> + </list> + <many-to-one name="billTo" entity-name="Address" lazy="false" cascade="all" foreign-key="PURCHASEORDER_BILLTO" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`ADDRESS_BILLTO_E_ID`"/> + </many-to-one> + <many-to-one name="shipTo" entity-name="Address" lazy="false" cascade="all" foreign-key="PURCHASEORDER_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="orderDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ORDERDATE`"/> + </property> + <property name="status" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATUS`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.epo2.OrderStatus</param> + <param name="eclassifier">OrderStatus</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</param> + </type> + </property> + <many-to-one name="customer" entity-name="Customer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PURCHASEORDER_CUSTOMER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`PURCHASEORDER_CUSTOMER_E_ID`"/> + </many-to-one> + <many-to-one name="previousOrder" entity-name="PurchaseOrder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PURCHASEORDER_PREVIOUSORDER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PURCHASEORDER_PREVIOUSORDER_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.SupplierImpl" entity-name="Supplier" abstract="false" lazy="false" table="`SUPPLIER`"> + <meta attribute="eclassName" inherit="false">Supplier</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="customers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SUPPLIER_CUSTOMERS"> + <column name="`SUPPLIER_CUSTOMERS_E_ID`" unique="false"/> + </key> + <list-index column="`SUPPLIER_CUSTOMERS_IDX`"/> + <one-to-many entity-name="Customer"/> + </list> + <list name="orders" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SUPPLIER_ORDERS"> + <column name="`SUPPLIER_ORDERS_E_ID`" unique="false"/> + </key> + <list-index column="`SUPPLIER_ORDERS_IDX`"/> + <one-to-many entity-name="PurchaseOrder"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="customerID" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`CUSTOMERID`"/> + </property> + <list name="orders" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`PURCHASEORDER_CUSTOMER_E_ID`" unique="false"/> + </key> + <list-index column="`CUSTOMER_ORDERS_IDX`"/> + <one-to-many entity-name="PurchaseOrder"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.GlobalAddressImpl" entity-name="GlobalAddress" abstract="false" lazy="false" extends="Address" table="`GLOBALADDRESS`"> + <meta attribute="eclassName" inherit="false">GlobalAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <key> + <column name="`ADDRESS_E_ID`"/> + </key> + <property name="countryCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COUNTRYCODE`"/> + </property> + <list name="location" table="`GLOBALADDRESS_LOCATION`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`GLOBALADDRESS_LOCATION_E_ID`" unique="false"/> + </key> + <list-index column="`GLOBALADDRESS_LOCATION_IDX`"/> + <element type="java.lang.String"/> + </list> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.GlobalLocationImpl" entity-name="GlobalLocation" abstract="false" lazy="false" table="`GLOBALLOCATION`"> + <meta attribute="eclassName" inherit="false">GlobalLocation</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="countryCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COUNTRYCODE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ExtendedPO2Test$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ExtendedPO2Test$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..1a86a5b57 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ExtendedPO2Test$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,209 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="order" entity-name="PurchaseOrder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_ORDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`ITEM_ORDER_E_ID`"/> + </many-to-one> + <property name="productName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PRODUCTNAME`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`QUANTITY`"/> + </property> + <property name="USPrice" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`USPRICE`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="shipDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`SHIPDATE`"/> + </property> + <property name="partNum" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PARTNUM`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRY`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <property name="street" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CITY`"/> + </property> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" discriminator-value="PurchaseOrder" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PURCHASEORDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="items" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PURCHASEORDER_ITEMS"> + <column name="`ITEM_ORDER_E_ID`" unique="false"/> + </key> + <list-index column="`PURCHASEORDER_ITEMS_IDX`"/> + <one-to-many entity-name="Item"/> + </list> + <many-to-one name="billTo" entity-name="Address" lazy="false" cascade="all" foreign-key="PURCHASEORDER_BILLTO" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`ADDRESS_BILLTO_E_ID`"/> + </many-to-one> + <many-to-one name="shipTo" entity-name="Address" lazy="false" cascade="all" foreign-key="PURCHASEORDER_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="orderDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ORDERDATE`"/> + </property> + <property name="status" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATUS`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.epo2.OrderStatus</param> + <param name="eclassifier">OrderStatus</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</param> + </type> + </property> + <many-to-one name="customer" entity-name="Customer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PURCHASEORDER_CUSTOMER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`PURCHASEORDER_CUSTOMER_E_ID`"/> + </many-to-one> + <many-to-one name="previousOrder" entity-name="PurchaseOrder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PURCHASEORDER_PREVIOUSORDER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PURCHASEORDER_PREVIOUSORDER_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.SupplierImpl" entity-name="Supplier" abstract="false" lazy="false" discriminator-value="Supplier" table="`SUPPLIER`"> + <meta attribute="eclassName" inherit="false">Supplier</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="customers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SUPPLIER_CUSTOMERS"> + <column name="`SUPPLIER_CUSTOMERS_E_ID`" unique="false"/> + </key> + <list-index column="`SUPPLIER_CUSTOMERS_IDX`"/> + <one-to-many entity-name="Customer"/> + </list> + <list name="orders" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SUPPLIER_ORDERS"> + <column name="`SUPPLIER_ORDERS_E_ID`" unique="false"/> + </key> + <list-index column="`SUPPLIER_ORDERS_IDX`"/> + <one-to-many entity-name="PurchaseOrder"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" discriminator-value="Customer" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CUSTOMERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="customerID" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`CUSTOMERID`"/> + </property> + <list name="orders" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`PURCHASEORDER_CUSTOMER_E_ID`" unique="false"/> + </key> + <list-index column="`CUSTOMER_ORDERS_IDX`"/> + <one-to-many entity-name="PurchaseOrder"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.GlobalAddressImpl" entity-name="GlobalAddress" abstract="false" lazy="false" extends="Address" discriminator-value="GlobalAddress"> + <meta attribute="eclassName" inherit="false">GlobalAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <property name="countryCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COUNTRYCODE`"/> + </property> + <list name="location" table="`GLOBALADDRESS_LOCATION`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`GLOBALADDRESS_LOCATION_E_ID`" unique="false"/> + </key> + <list-index column="`GLOBALADDRESS_LOCATION_IDX`"/> + <element type="java.lang.String"/> + </list> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.sample.epo2.impl.GlobalLocationImpl" entity-name="GlobalLocation" abstract="false" lazy="false" discriminator-value="GlobalLocation" table="`GLOBALLOCATION`"> + <meta attribute="eclassName" inherit="false">GlobalLocation</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/extendedpo2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="GLOBALLOCATIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="countryCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COUNTRYCODE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/FleetEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/FleetEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..33f9abfc3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/FleetEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass entity-name="Vehicle" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Vehicle"/> + <subclass entity-name="Temporal" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Temporal"/> + <subclass entity-name="Person" abstract="false" lazy="false" extends="Temporal" discriminator-value="Person"/> + <subclass entity-name="Address" abstract="false" lazy="false" extends="Temporal" discriminator-value="Address"/> + <subclass entity-name="VehicleInfo" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="VehicleInfo"/> + <subclass entity-name="ManufacturingPlant" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ManufacturingPlant"/> + <subclass entity-name="Fleet" abstract="false" lazy="false" extends="Temporal" discriminator-value="Fleet"/> + <subclass entity-name="Garage" abstract="false" lazy="false" extends="Temporal" discriminator-value="Garage"/> + <subclass entity-name="Tire" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Tire"/> + <subclass entity-name="Car" abstract="false" lazy="false" extends="Vehicle" discriminator-value="Car"/> + <subclass entity-name="Hybrid" abstract="false" lazy="false" extends="Car" discriminator-value="Hybrid"/> + <subclass name="fleet.PassengerVehicle" entity-name="PassengerVehicle" abstract="true" lazy="false" extends="EAV_EObject" discriminator-value="PassengerVehicle"/> + <subclass entity-name="EngineFactory" abstract="false" lazy="false" extends="ManufacturingPlant" discriminator-value="EngineFactory"/> + <subclass entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"/> + <subclass entity-name="Vin" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Vin"/> + <subclass entity-name="TransportationDevice" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TransportationDevice"/> + <subclass entity-name="VersionHolder" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="VersionHolder"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/FleetEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/FleetEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..33f9abfc3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/FleetEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass entity-name="Vehicle" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Vehicle"/> + <subclass entity-name="Temporal" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Temporal"/> + <subclass entity-name="Person" abstract="false" lazy="false" extends="Temporal" discriminator-value="Person"/> + <subclass entity-name="Address" abstract="false" lazy="false" extends="Temporal" discriminator-value="Address"/> + <subclass entity-name="VehicleInfo" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="VehicleInfo"/> + <subclass entity-name="ManufacturingPlant" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ManufacturingPlant"/> + <subclass entity-name="Fleet" abstract="false" lazy="false" extends="Temporal" discriminator-value="Fleet"/> + <subclass entity-name="Garage" abstract="false" lazy="false" extends="Temporal" discriminator-value="Garage"/> + <subclass entity-name="Tire" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Tire"/> + <subclass entity-name="Car" abstract="false" lazy="false" extends="Vehicle" discriminator-value="Car"/> + <subclass entity-name="Hybrid" abstract="false" lazy="false" extends="Car" discriminator-value="Hybrid"/> + <subclass name="fleet.PassengerVehicle" entity-name="PassengerVehicle" abstract="true" lazy="false" extends="EAV_EObject" discriminator-value="PassengerVehicle"/> + <subclass entity-name="EngineFactory" abstract="false" lazy="false" extends="ManufacturingPlant" discriminator-value="EngineFactory"/> + <subclass entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"/> + <subclass entity-name="Vin" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Vin"/> + <subclass entity-name="TransportationDevice" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TransportationDevice"/> + <subclass entity-name="VersionHolder" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="VersionHolder"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_e_o_hibernate.hbm.xml index 9fd4372a1..9fd4372a1 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_e_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_h_o_hibernate.hbm.xml index 9fd4372a1..9fd4372a1 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVAction_hsqldb_h_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..a7d28fa50 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,12 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Book" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Library" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Library"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Writer" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a7d28fa50 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,12 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Book" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Library" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Library"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Writer" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVResourceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVResourceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..a7d28fa50 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVResourceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,12 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Book" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Library" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Library"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Writer" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVResourceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVResourceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a7d28fa50 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryEAVResourceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,12 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Book" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Library" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Library"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" extends="EAV_EObject" discriminator-value="Writer" proxy="org.eclipse.emf.teneo.samples.emf.sample.library.Writer"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..22fd317c6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..03d8139d1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyJoinMoreAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyJoinMoreAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..9f6baaf6a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyJoinMoreAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + <join table="`WRITER_BOOK`" inverse="false" optional="true"> + <key update="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </key> + <many-to-one name="author" entity-name="Writer" lazy="false" insert="true" update="true" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR"> + <column not-null="false" unique="false" name="`WRITER_E_ID`"/> + </many-to-one> + </join> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" table="`ABC`" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <many-to-many entity-name="Writer" unique="true" foreign-key="schrijvers"> + <column name="`WRITER_E_ID`" unique="false"/> + </many-to-many> + </list> + <list name="books" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" inverse="true" table="`WRITER_BOOK`" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`WRITER_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <many-to-many entity-name="Book" unique="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyJoinMoreAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyJoinMoreAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..922553408 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyJoinMoreAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,103 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + <join table="`WRITER_BOOK`" inverse="false" optional="true"> + <key update="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </key> + <many-to-one name="author" entity-name="Writer" lazy="false" insert="true" update="true" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR"> + <column not-null="false" unique="false" name="`WRITER_E_ID`"/> + </many-to-one> + </join> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" table="`ABC`" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <many-to-many entity-name="Writer" unique="true" foreign-key="schrijvers"> + <column name="`WRITER_E_ID`" unique="false"/> + </many-to-many> + </list> + <list name="books" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" inverse="true" table="`WRITER_BOOK`" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`WRITER_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <many-to-many entity-name="Book" unique="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyMoreAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyMoreAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..22fd317c6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyMoreAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyMoreAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyMoreAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..03d8139d1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryExtraLazyMoreAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryInterfaceQueryTest_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryInterfaceQueryTest_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..0edf35eea --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryInterfaceQueryTest_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,89 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Book" abstract="false" lazy="false" table="`ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Library" abstract="false" lazy="false" table="`ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Writer" abstract="false" lazy="false" table="`ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryInterfaceQueryTest_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryInterfaceQueryTest_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..2031315c0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryInterfaceQueryTest_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,98 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Book" abstract="false" lazy="false" discriminator-value="org.eclipse.emf.teneo.samples.emf.sample.library.Book" table="`ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Library" abstract="false" lazy="false" discriminator-value="org.eclipse.emf.teneo.samples.emf.sample.library.Library" table="`ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Writer" abstract="false" lazy="false" discriminator-value="org.eclipse.emf.teneo.samples.emf.sample.library.Writer" table="`ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ORG_ECLIPSE_EMF_TENEO_SAMPLES_EMF_SAMPLE_LIBRARY_WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="org.eclipse.emf.teneo.samples.emf.sample.library.Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAddContentAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAddContentAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAddContentAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAddContentAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAddContentAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibrarySessionControllerAddContentAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_e_o_hibernate.hbm.xml index 73e472a7f..d46bcfa1e 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -6,35 +6,35 @@ <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> <param name="edatatype">BookCategoryObject</param> </typedef> - <class entity-name="Book" abstract="false" lazy="false" table="`tab_book`"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`TAB_BOOK`"> <meta attribute="eclassName" inherit="false">Book</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> <cache usage="read-write"/> <id name="title" type="java.lang.String"> - <column not-null="true" unique="false" name="`col_title`" length="50"/> + <column not-null="true" unique="false" name="`COL_TITLE`" length="50"/> </id> <version name="COL_e_version" column="COL_e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> - <column not-null="false" unique="false" name="`col_pages`"/> + <column not-null="false" unique="false" name="`COL_PAGES`"/> </property> <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> - <column not-null="false" unique="false" name="`col_category`"/> + <column not-null="false" unique="false" name="`COL_CATEGORY`"/> <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> <param name="eclassifier">BookCategory</param> <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> </type> </property> - <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FKPRE_book_author" insert="false" update="false" not-null="false"> - <column not-null="false" unique="false" name="`col_book_author_e_id`"/> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FKPRE_BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`COL_BOOK_AUTHOR_E_ID`"/> </many-to-one> <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> - <column not-null="false" unique="false" name="`col_test`"/> + <column not-null="false" unique="false" name="`COL_TEST`"/> </property> </class> - <class entity-name="Library" abstract="false" lazy="false" table="`tab_library`"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`TAB_LIBRARY`"> <meta attribute="eclassName" inherit="false">Library</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> <cache usage="read-write"/> @@ -46,26 +46,26 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`col_name`" length="50"/> + <column not-null="true" unique="false" name="`COL_NAME`" length="50"/> </property> <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> <cache usage="read-write"/> <key update="true" foreign-key="schrijvers"> - <column name="`col_library_writers_e_id`" not-null="false" unique="false"/> + <column name="`COL_LIBRARY_WRITERS_E_ID`" unique="false"/> </key> - <list-index column="`test_index`"/> + <list-index column="`TEST_INDEX`"/> <one-to-many entity-name="Writer"/> </list> <list name="books" lazy="true" cascade="all,delete-orphan"> <cache usage="read-write"/> - <key update="true" foreign-key="FKPRE_library_books"> - <column name="`col_library_books_e_id`" not-null="false" unique="false"/> + <key update="true" foreign-key="FKPRE_LIBRARY_BOOKS"> + <column name="`COL_LIBRARY_BOOKS_E_ID`" unique="false"/> </key> - <list-index column="`col_library_books_idx`"/> + <list-index column="`COL_LIBRARY_BOOKS_IDX`"/> <one-to-many entity-name="Book"/> </list> </class> - <class entity-name="Writer" abstract="false" lazy="false" table="`tab_writer`"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`TAB_WRITER`"> <meta attribute="eclassName" inherit="false">Writer</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> <cache usage="read-write"/> @@ -77,14 +77,14 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`col_name`" length="50"/> + <column not-null="true" unique="false" name="`COL_NAME`" length="50"/> </property> - <list name="books" lazy="true" cascade="merge,persist,save-update,lock,refresh"> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> <cache usage="read-write"/> <key update="true"> - <column name="`col_book_author_e_id`" not-null="false" unique="false"/> + <column name="`COL_BOOK_AUTHOR_E_ID`" unique="false"/> </key> - <list-index column="`col_writer_books_idx`"/> + <list-index column="`COL_WRITER_BOOKS_IDX`"/> <one-to-many entity-name="Book"/> </list> </class> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_h_o_hibernate.hbm.xml index eb31161bb..285b5e8af 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -6,38 +6,38 @@ <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> <param name="edatatype">BookCategoryObject</param> </typedef> - <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`tab_book`"> + <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`TAB_BOOK`"> <meta attribute="eclassName" inherit="false">Book</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> <cache usage="read-write"/> <id name="title" type="java.lang.String"> - <column not-null="true" unique="false" name="`col_title`" length="50"/> + <column not-null="true" unique="false" name="`COL_TITLE`" length="50"/> </id> <discriminator type="string"> - <column name="COL_dtype" index="TAB_bookCOL_dtype" length="255" not-null="true"/> + <column name="`COL_DTYPE`" index="TAB_BOOKCOL_DTYPE" length="255" not-null="true"/> </discriminator> <version name="COL_e_version" column="COL_e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> - <column not-null="false" unique="false" name="`col_pages`"/> + <column not-null="false" unique="false" name="`COL_PAGES`"/> </property> <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> - <column not-null="false" unique="false" name="`col_category`"/> + <column not-null="false" unique="false" name="`COL_CATEGORY`"/> <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> <param name="eclassifier">BookCategory</param> <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> </type> </property> - <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FKPRE_book_author" insert="false" update="false" not-null="false"> - <column not-null="false" unique="false" name="`col_book_author_e_id`"/> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FKPRE_BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`COL_BOOK_AUTHOR_E_ID`"/> </many-to-one> <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> - <column not-null="false" unique="false" name="`col_test`"/> + <column not-null="false" unique="false" name="`COL_TEST`"/> </property> </class> - <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`tab_library`"> + <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`TAB_LIBRARY`"> <meta attribute="eclassName" inherit="false">Library</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> <cache usage="read-write"/> @@ -46,32 +46,32 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="COL_dtype" index="TAB_libraryCOL_dtype" length="255" not-null="true"/> + <column name="`COL_DTYPE`" index="TAB_LIBRARYCOL_DTYPE" length="255" not-null="true"/> </discriminator> <version name="COL_e_version" column="COL_e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`col_name`" length="50"/> + <column not-null="true" unique="false" name="`COL_NAME`" length="50"/> </property> <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> <cache usage="read-write"/> <key update="true" foreign-key="schrijvers"> - <column name="`col_library_writers_e_id`" not-null="false" unique="false"/> + <column name="`COL_LIBRARY_WRITERS_E_ID`" unique="false"/> </key> - <list-index column="`test_index`"/> + <list-index column="`TEST_INDEX`"/> <one-to-many entity-name="Writer"/> </list> <list name="books" lazy="true" cascade="all,delete-orphan"> <cache usage="read-write"/> - <key update="true" foreign-key="FKPRE_library_books"> - <column name="`col_library_books_e_id`" not-null="false" unique="false"/> + <key update="true" foreign-key="FKPRE_LIBRARY_BOOKS"> + <column name="`COL_LIBRARY_BOOKS_E_ID`" unique="false"/> </key> - <list-index column="`col_library_books_idx`"/> + <list-index column="`COL_LIBRARY_BOOKS_IDX`"/> <one-to-many entity-name="Book"/> </list> </class> - <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`tab_writer`"> + <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`TAB_WRITER`"> <meta attribute="eclassName" inherit="false">Writer</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> <cache usage="read-write"/> @@ -80,20 +80,20 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="COL_dtype" index="TAB_writerCOL_dtype" length="255" not-null="true"/> + <column name="`COL_DTYPE`" index="TAB_WRITERCOL_DTYPE" length="255" not-null="true"/> </discriminator> <version name="COL_e_version" column="COL_e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`col_name`" length="50"/> + <column not-null="true" unique="false" name="`COL_NAME`" length="50"/> </property> - <list name="books" lazy="true" cascade="merge,persist,save-update,lock,refresh"> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> <cache usage="read-write"/> <key update="true"> - <column name="`col_book_author_e_id`" not-null="false" unique="false"/> + <column name="`COL_BOOK_AUTHOR_E_ID`" unique="false"/> </key> - <list-index column="`col_writer_books_idx`"/> + <list-index column="`COL_WRITER_BOOKS_IDX`"/> <one-to-many entity-name="Book"/> </list> </class> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryValidateResourceTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryValidateResourceTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryValidateResourceTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryValidateResourceTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryValidateResourceTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/LibraryValidateResourceTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ProductEAVTest_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ProductEAVTest_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..8e340cbb0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ProductEAVTest_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,8 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ProductType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SupplierType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ClassificationTypeImpl" entity-name="ClassificationType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ClassificationType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ProductEAVTest_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ProductEAVTest_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..8e340cbb0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/ProductEAVTest_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,8 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ProductType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SupplierType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ClassificationTypeImpl" entity-name="ClassificationType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ClassificationType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/SchoolLibraryTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/SchoolLibraryTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b264ed990 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/SchoolLibraryTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,123 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.schoollibrary.impl.AssetImpl" entity-name="Asset" abstract="false" lazy="false" table="`ASSET`"> + <meta attribute="eclassName" inherit="false">Asset</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/schoollibrary.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.schoollibrary.impl.SchoolBookImpl" entity-name="SchoolBook" abstract="false" lazy="false" extends="Book" table="`SCHOOLBOOK`"> + <meta attribute="eclassName" inherit="false">SchoolBook</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/schoollibrary.ecore</meta> + <key> + <column name="`BOOK_E_ID`"/> + </key> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.schoollibrary.impl.SchoolLibraryImpl" entity-name="SchoolLibrary" abstract="false" lazy="false" extends="Library" table="`SCHOOLLIBRARY`"> + <meta attribute="eclassName" inherit="false">SchoolLibrary</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/schoollibrary.ecore</meta> + <key> + <column name="`LIBRARY_E_ID`"/> + </key> + <property name="location" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LOCATION`"/> + </property> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/SchoolLibraryTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/SchoolLibraryTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..294f16e5b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/SchoolLibraryTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/library.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.schoollibrary.impl.AssetImpl" entity-name="Asset" abstract="false" lazy="false" discriminator-value="Asset" table="`ASSET`"> + <meta attribute="eclassName" inherit="false">Asset</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/schoollibrary.ecore</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ASSETDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.schoollibrary.impl.SchoolBookImpl" entity-name="SchoolBook" abstract="false" lazy="false" extends="Book" discriminator-value="SchoolBook"> + <meta attribute="eclassName" inherit="false">SchoolBook</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/schoollibrary.ecore</meta> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.schoollibrary.schoollibrary.impl.SchoolLibraryImpl" entity-name="SchoolLibrary" abstract="false" lazy="false" extends="Library" discriminator-value="SchoolLibrary"> + <meta attribute="eclassName" inherit="false">SchoolLibrary</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/emf/sample/schoollibrary/schoollibrary.ecore</meta> + <property name="location" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LOCATION`"/> + </property> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestDoubleEAV_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestDoubleEAV_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..951a35fe4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestDoubleEAV_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,6 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass entity-name="TestType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TestType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestDoubleEAV_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestDoubleEAV_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..951a35fe4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestDoubleEAV_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,6 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass entity-name="TestType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TestType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestLazyUtilsAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestLazyUtilsAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestLazyUtilsAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestLazyUtilsAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestLazyUtilsAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.sample/TestLazyUtilsAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesEAVAction$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesEAVAction$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..991359fcb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesEAVAction$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.AImpl" entity-name="A" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="A"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.RImpl" entity-name="R" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="R"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesEAVAction$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesEAVAction$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..991359fcb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesEAVAction$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.AImpl" entity-name="A" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="A"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.RImpl" entity-name="R" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="R"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesTest$1_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesTest$1_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..17e79388f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesTest$1_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,47 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.AImpl" entity-name="A" abstract="false" lazy="false" table="`A`"> + <meta attribute="eclassName" inherit="false">A</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/attributes</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="b" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`B`"/> + </property> + <property name="c" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`C`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="d" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`D`"/> + </property> + <many-to-one name="myR" entity-name="R" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="A_MYR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`R_MYR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.RImpl" entity-name="R" abstract="false" lazy="false" table="`R`"> + <meta attribute="eclassName" inherit="false">R</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/attributes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesTest$1_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesTest$1_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..366c8c047 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/AttributesTest$1_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,53 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.AImpl" entity-name="A" abstract="false" lazy="false" discriminator-value="A" table="`A`"> + <meta attribute="eclassName" inherit="false">A</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/attributes</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="b" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`B`"/> + </property> + <property name="c" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`C`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="d" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`D`"/> + </property> + <many-to-one name="myR" entity-name="R" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="A_MYR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`R_MYR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.attributes.impl.RImpl" entity-name="R" abstract="false" lazy="false" discriminator-value="R" table="`R`"> + <meta attribute="eclassName" inherit="false">R</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/attributes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DateTimeEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DateTimeEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..91eadcf37 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DateTimeEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,6 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.datetime.impl.TestDateImpl" entity-name="TestDate" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TestDate"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DateTimeEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DateTimeEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..91eadcf37 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DateTimeEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,6 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.datetime.impl.TestDateImpl" entity-name="TestDate" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="TestDate"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DocumentRootEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DocumentRootEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..bcee22112 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DocumentRootEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl" entity-name="ComplexType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ComplexType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl" entity-name="documentroot.DocumentRoot" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="documentroot.DocumentRoot"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DocumentRootEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DocumentRootEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..bcee22112 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/DocumentRootEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl" entity-name="ComplexType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ComplexType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl" entity-name="documentroot.DocumentRoot" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="documentroot.DocumentRoot"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e1426dc5f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <one-to-many entity-name="Writer"/> + </map> + <map name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <map-key-many-to-many entity-name="Writer"/> + <element type="java.lang.String"/> + </map> + <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <map-key type="timestamp"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </element> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f20359a83 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,77 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <one-to-many entity-name="Writer"/> + </map> + <map name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <map-key-many-to-many entity-name="Writer"/> + <element type="java.lang.String"/> + </map> + <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <map-key type="timestamp"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </element> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..05cbaae13 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,138 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..3280ff74a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,156 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntry" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" discriminator-value="StringToStringMapEntry" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntry" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntry" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..99acf4b15 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,15 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="DateToCategoryMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToStringMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToWriterMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="WriterToStringMapEntry"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..99acf4b15 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,15 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="DateToCategoryMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToStringMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToWriterMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="WriterToStringMapEntry"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2b2a7bb23 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,138 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="writers" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..35ed63cf1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,156 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="writers" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntry" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" discriminator-value="StringToStringMapEntry" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntry" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntry" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..99acf4b15 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,15 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="DateToCategoryMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToStringMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToWriterMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="WriterToStringMapEntry"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..99acf4b15 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,15 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Book"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="DateToCategoryMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToStringMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="StringToWriterMapEntry"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Writer"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="WriterToStringMapEntry"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EcoreAttrsEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EcoreAttrsEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..f6a64e7f1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EcoreAttrsEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,9 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Element"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.FeatureImpl" entity-name="Feature" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Feature"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.MixedImpl" entity-name="Mixed" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Mixed"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.NameListImpl" entity-name="NameList" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="NameList"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EcoreAttrsEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EcoreAttrsEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f6a64e7f1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EcoreAttrsEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,9 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Element"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.FeatureImpl" entity-name="Feature" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Feature"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.MixedImpl" entity-name="Mixed" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Mixed"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.NameListImpl" entity-name="NameList" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="NameList"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_e_o_hibernate.hbm.xml index 033d3d2a5..033d3d2a5 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_e_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_h_o_hibernate.hbm.xml index 033d3d2a5..033d3d2a5 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ExtensionEAVAction_hsqldb_h_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/GroupEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/GroupEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ffb08e2d4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/GroupEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,10 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Address"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressGroupImpl" entity-name="AddressGroup" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="AddressGroup"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="AddressList"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllMapTypeImpl" entity-name="SimpleAllMapType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleAllMapType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllTypeImpl" entity-name="SimpleAllType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleAllType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/GroupEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/GroupEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..ffb08e2d4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/GroupEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,10 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Address"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressGroupImpl" entity-name="AddressGroup" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="AddressGroup"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="AddressList"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllMapTypeImpl" entity-name="SimpleAllMapType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleAllMapType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllTypeImpl" entity-name="SimpleAllType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleAllType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ListEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ListEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..68381f100 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ListEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,18 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="list.SixStatesList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">SixStatesList</param> + </typedef> + <typedef name="list.StateList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StateList</param> + </typedef> + <typedef name="list.StringList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StringList</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.list.impl.statesByCountryImpl" entity-name="statesByCountry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="statesByCountry"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ListEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ListEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..68381f100 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/ListEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,18 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="list.SixStatesList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">SixStatesList</param> + </typedef> + <typedef name="list.StateList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StateList</param> + </typedef> + <typedef name="list.StringList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StringList</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.list.impl.statesByCountryImpl" entity-name="statesByCountry" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="statesByCountry"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/MixedEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/MixedEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1dd1f763a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/MixedEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.LetterBodyTypeImpl" entity-name="LetterBodyType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="LetterBodyType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.SalutationTypeImpl" entity-name="SalutationType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SalutationType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/MixedEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/MixedEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..1dd1f763a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/MixedEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.LetterBodyTypeImpl" entity-name="LetterBodyType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="LetterBodyType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.SalutationTypeImpl" entity-name="SalutationType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SalutationType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/NestedGroupEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/NestedGroupEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..9a8137f75 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/NestedGroupEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,8 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.AImpl" entity-name="A" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="A"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.CTypeImpl" entity-name="CType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="CType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Element"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/NestedGroupEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/NestedGroupEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..9a8137f75 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/NestedGroupEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,8 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.AImpl" entity-name="A" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="A"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.CTypeImpl" entity-name="CType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="CType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Element"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimpleTypeEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimpleTypeEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6b7d9fc36 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimpleTypeEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,16 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="simpletypes.SimpleEnumObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">SimpleEnumObject</param> + </typedef> + <typedef name="simpletypes.StringArray" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">StringArray</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleListImpl" entity-name="SimpleList" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleList"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeImpl" entity-name="SimpleType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeObjectImpl" entity-name="SimpleTypeObject" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleTypeObject"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimpleTypeEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimpleTypeEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6b7d9fc36 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimpleTypeEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,16 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="simpletypes.SimpleEnumObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">SimpleEnumObject</param> + </typedef> + <typedef name="simpletypes.StringArray" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">StringArray</param> + </typedef> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleListImpl" entity-name="SimpleList" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleList"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeImpl" entity-name="SimpleType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeObjectImpl" entity-name="SimpleTypeObject" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="SimpleTypeObject"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimplefeaturemapEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimplefeaturemapEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b43e8e3f7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimplefeaturemapEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="PurchaseOrder"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.SupplierImpl" entity-name="Supplier" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Supplier"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimplefeaturemapEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimplefeaturemapEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b43e8e3f7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SimplefeaturemapEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,7 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="PurchaseOrder"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.SupplierImpl" entity-name="Supplier" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="Supplier"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..04fb35396 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,10 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.ComplexNumberImpl" entity-name="ComplexNumber" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ComplexNumber"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.EvenComplexNumberTypeImpl" entity-name="EvenComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" discriminator-value="EvenComplexNumberType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.MultiNumberTypeImpl" entity-name="MultiNumberType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="MultiNumberType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.NumberTypeImpl" entity-name="NumberType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="NumberType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.OddComplexNumberTypeImpl" entity-name="OddComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" discriminator-value="OddComplexNumberType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..04fb35396 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,10 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.ComplexNumberImpl" entity-name="ComplexNumber" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ComplexNumber"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.EvenComplexNumberTypeImpl" entity-name="EvenComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" discriminator-value="EvenComplexNumberType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.MultiNumberTypeImpl" entity-name="MultiNumberType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="MultiNumberType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.NumberTypeImpl" entity-name="NumberType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="NumberType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.OddComplexNumberTypeImpl" entity-name="OddComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" discriminator-value="OddComplexNumberType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionzvonEAVAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionzvonEAVAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4b58da838 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionzvonEAVAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,9 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexAAAImpl" entity-name="ComplexAAA" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ComplexAAA"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexEvenTypeImpl" entity-name="ComplexEvenType" abstract="false" lazy="false" extends="ComplexAAA" discriminator-value="ComplexEvenType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexOddTypeImpl" entity-name="ComplexOddType" abstract="false" lazy="false" extends="ComplexAAA" discriminator-value="ComplexOddType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.RootTypeImpl" entity-name="RootType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="RootType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionzvonEAVAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionzvonEAVAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..4b58da838 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/SubstitutionzvonEAVAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,9 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexAAAImpl" entity-name="ComplexAAA" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="ComplexAAA"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexEvenTypeImpl" entity-name="ComplexEvenType" abstract="false" lazy="false" extends="ComplexAAA" discriminator-value="ComplexEvenType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexOddTypeImpl" entity-name="ComplexOddType" abstract="false" lazy="false" extends="ComplexAAA" discriminator-value="ComplexOddType"/> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.RootTypeImpl" entity-name="RootType" abstract="false" lazy="false" extends="EAV_EObject" discriminator-value="RootType"/> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5b886015f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,114 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" table="`LIBRARY`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" table="`WRITER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" table="`ONETIMEWONDER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" table="`AUTHOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..de131434f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" discriminator-value="Book" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" discriminator-value="Library" table="`LIBRARY`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" discriminator-value="Writer" table="`WRITER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" discriminator-value="OneTimeWonder" table="`ONETIMEWONDER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONETIMEWONDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" discriminator-value="Author" table="`AUTHOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AUTHORDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ285372Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ285372Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..8ad25fcb8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ285372Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,65 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.test.databinding.emfdb.impl.FamilyImpl" entity-name="Family" abstract="false" lazy="false" table="`FAMILY`"> + <meta attribute="eclassName" inherit="false">Family</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/emfdb/1.0.0</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="string" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STRING`"/> + </property> + <list name="persons" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FAMILY_PERSONS"> + <column name="`FAMILY_PERSONS_E_ID`" unique="false"/> + </key> + <list-index column="`FAMILY_PERSONS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> + <class name="org.eclipse.emf.test.databinding.emfdb.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/emfdb/1.0.0</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="notes" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_NOTES"> + <column name="`PERSON_NOTES_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_NOTES_IDX`"/> + <one-to-many entity-name="Note"/> + </list> + <list name="parents" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PERSON_PARENTS"> + <column name="`PERSON_PARENTS_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_PARENTS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> + <class name="org.eclipse.emf.test.databinding.emfdb.impl.NoteImpl" entity-name="Note" abstract="false" lazy="false" table="`NOTE`"> + <meta attribute="eclassName" inherit="false">Note</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/emfdb/1.0.0</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ285372Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ285372Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..688216d62 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ285372Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,74 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.test.databinding.emfdb.impl.FamilyImpl" entity-name="Family" abstract="false" lazy="false" discriminator-value="Family" table="`FAMILY`"> + <meta attribute="eclassName" inherit="false">Family</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/emfdb/1.0.0</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FAMILYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="string" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STRING`"/> + </property> + <list name="persons" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FAMILY_PERSONS"> + <column name="`FAMILY_PERSONS_E_ID`" unique="false"/> + </key> + <list-index column="`FAMILY_PERSONS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> + <class name="org.eclipse.emf.test.databinding.emfdb.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/emfdb/1.0.0</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="notes" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_NOTES"> + <column name="`PERSON_NOTES_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_NOTES_IDX`"/> + <one-to-many entity-name="Note"/> + </list> + <list name="parents" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PERSON_PARENTS"> + <column name="`PERSON_PARENTS_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_PARENTS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> + <class name="org.eclipse.emf.test.databinding.emfdb.impl.NoteImpl" entity-name="Note" abstract="false" lazy="false" discriminator-value="Note" table="`NOTE`"> + <meta attribute="eclassName" inherit="false">Note</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/emfdb/1.0.0</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NOTEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4f0ac23fc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,68 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz329275.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="unSettableStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGNODEFAULT`"/> + </property> + <property name="standardStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGNODEFAULT`"/> + </property> + <property name="unSettableStringWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGWITHDEFAULT`"/> + </property> + <property name="standardStringDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGDEFAULT`"/> + </property> + <property name="unSettableEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`UNSETTABLEENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="standardEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STANDARDENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="unSettablePrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVENODEFAULT`"/> + </property> + <property name="standardPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVENODEFAULT`"/> + </property> + <property name="unSettablePrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVENODEFAULT`"/> + </property> + <property name="standardObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVENODEFAULT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..860dc8da3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz329275.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="unSettableStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGNODEFAULT`"/> + </property> + <property name="standardStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGNODEFAULT`"/> + </property> + <property name="unSettableStringWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGWITHDEFAULT`"/> + </property> + <property name="standardStringDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGDEFAULT`"/> + </property> + <property name="unSettableEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`UNSETTABLEENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="standardEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STANDARDENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="unSettablePrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVENODEFAULT`"/> + </property> + <property name="standardPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVENODEFAULT`"/> + </property> + <property name="unSettablePrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVENODEFAULT`"/> + </property> + <property name="standardObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVENODEFAULT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_ConvertUnsetToNulllAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_ConvertUnsetToNulllAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4f0ac23fc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_ConvertUnsetToNulllAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,68 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz329275.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="unSettableStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGNODEFAULT`"/> + </property> + <property name="standardStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGNODEFAULT`"/> + </property> + <property name="unSettableStringWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGWITHDEFAULT`"/> + </property> + <property name="standardStringDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGDEFAULT`"/> + </property> + <property name="unSettableEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`UNSETTABLEENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="standardEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STANDARDENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="unSettablePrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVENODEFAULT`"/> + </property> + <property name="standardPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVENODEFAULT`"/> + </property> + <property name="unSettablePrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVENODEFAULT`"/> + </property> + <property name="standardObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVENODEFAULT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_ConvertUnsetToNulllAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_ConvertUnsetToNulllAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..860dc8da3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_ConvertUnsetToNulllAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz329275.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="unSettableStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGNODEFAULT`"/> + </property> + <property name="standardStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGNODEFAULT`"/> + </property> + <property name="unSettableStringWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGWITHDEFAULT`"/> + </property> + <property name="standardStringDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGDEFAULT`"/> + </property> + <property name="unSettableEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`UNSETTABLEENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="standardEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STANDARDENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="unSettablePrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVENODEFAULT`"/> + </property> + <property name="standardPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVENODEFAULT`"/> + </property> + <property name="unSettablePrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVENODEFAULT`"/> + </property> + <property name="standardObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVENODEFAULT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_HandleUnsetAsNullAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_HandleUnsetAsNullAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4f0ac23fc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_HandleUnsetAsNullAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,68 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz329275.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="unSettableStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGNODEFAULT`"/> + </property> + <property name="standardStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGNODEFAULT`"/> + </property> + <property name="unSettableStringWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGWITHDEFAULT`"/> + </property> + <property name="standardStringDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGDEFAULT`"/> + </property> + <property name="unSettableEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`UNSETTABLEENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="standardEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STANDARDENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="unSettablePrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVENODEFAULT`"/> + </property> + <property name="standardPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVENODEFAULT`"/> + </property> + <property name="unSettablePrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVENODEFAULT`"/> + </property> + <property name="standardObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVENODEFAULT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_HandleUnsetAsNullAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_HandleUnsetAsNullAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..860dc8da3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ329275_HandleUnsetAsNullAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz329275.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="unSettableStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGNODEFAULT`"/> + </property> + <property name="standardStringNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGNODEFAULT`"/> + </property> + <property name="unSettableStringWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`UNSETTABLESTRINGWITHDEFAULT`"/> + </property> + <property name="standardStringDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STANDARDSTRINGDEFAULT`"/> + </property> + <property name="unSettableEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`UNSETTABLEENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="standardEnum" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STANDARDENUM`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz329275.TestEnum</param> + <param name="eclassifier">TestEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz329275</param> + </type> + </property> + <property name="unSettablePrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVENODEFAULT`"/> + </property> + <property name="standardPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVENODEFAULT`"/> + </property> + <property name="unSettablePrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`UNSETTABLEPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`STANDARDPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="standardObjectPrimitiveWithDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVEWITHDEFAULT`"/> + </property> + <property name="unSettableObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`UNSETTABLEOBJECTPRIMITIVENODEFAULT`"/> + </property> + <property name="standardObjectPrimitiveNoDefault" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`STANDARDOBJECTPRIMITIVENODEFAULT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz242995Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz242995Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5b886015f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz242995Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,114 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" table="`LIBRARY`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" table="`WRITER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" table="`ONETIMEWONDER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" table="`AUTHOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz242995Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz242995Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..de131434f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz242995Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" discriminator-value="Book" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" discriminator-value="Library" table="`LIBRARY`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" discriminator-value="Writer" table="`WRITER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" discriminator-value="OneTimeWonder" table="`ONETIMEWONDER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONETIMEWONDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" discriminator-value="Author" table="`AUTHOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AUTHORDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c5791a697 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,37 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="manies" lazy="true" cascade="delete-orphan,save-update,replicate,delete,persist"> + <key update="true" foreign-key="ONE_MANIES"> + <column name="`ONE_MANIES_E_ID`" unique="false"/> + </key> + <list-index column="`ONE_MANIES_IDX`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..bb6796216 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,43 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="manies" lazy="true" cascade="delete-orphan,save-update,replicate,delete,persist"> + <key update="true" foreign-key="ONE_MANIES"> + <column name="`ONE_MANIES_E_ID`" unique="false"/> + </key> + <list-index column="`ONE_MANIES_IDX`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..0c97958ac --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,114 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="false" table="`ONETIMEWONDER`"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="false" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="false" table="`AUTHOR`"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="false"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..e4f71629d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="false" discriminator-value="OneTimeWonder" table="`ONETIMEWONDER`"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONETIMEWONDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="false" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="false" discriminator-value="Author" table="`AUTHOR`"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AUTHORDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="false"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245634Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245634Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..206754b68 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245634Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,55 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.CityImpl" entity-name="City" abstract="false" lazy="true" table="`CITY`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.City"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="mayor" entity-name="Mayor" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="proxy" insert="true" update="true"/> + <one-to-one name="policeChief" entity-name="PoliceChief" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" property-ref="city"/> + <many-to-one name="country" entity-name="Country" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="CITY_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`COUNTRY_COUNTRY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.MayorImpl" entity-name="Mayor" abstract="false" lazy="true" table="`MAYOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.Mayor"> + <meta attribute="eclassName" inherit="false">Mayor</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <one-to-one name="city" entity-name="City" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" property-ref="mayor"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.PoliceChiefImpl" entity-name="PoliceChief" abstract="false" lazy="true" table="`POLICECHIEF`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.PoliceChief"> + <meta attribute="eclassName" inherit="false">PoliceChief</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="city" entity-name="City" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="proxy" insert="true" update="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.CountryImpl" entity-name="Country" abstract="false" lazy="true" table="`COUNTRY`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.Country"> + <meta attribute="eclassName" inherit="false">Country</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245634Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245634Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..2f7eb4541 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245634Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,67 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.CityImpl" entity-name="City" abstract="false" lazy="true" discriminator-value="City" table="`CITY`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.City"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="mayor" entity-name="Mayor" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="proxy" insert="true" update="true"/> + <one-to-one name="policeChief" entity-name="PoliceChief" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" property-ref="city"/> + <many-to-one name="country" entity-name="Country" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="CITY_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`COUNTRY_COUNTRY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.MayorImpl" entity-name="Mayor" abstract="false" lazy="true" discriminator-value="Mayor" table="`MAYOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.Mayor"> + <meta attribute="eclassName" inherit="false">Mayor</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MAYORDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <one-to-one name="city" entity-name="City" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" property-ref="mayor"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.PoliceChiefImpl" entity-name="PoliceChief" abstract="false" lazy="true" discriminator-value="PoliceChief" table="`POLICECHIEF`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.PoliceChief"> + <meta attribute="eclassName" inherit="false">PoliceChief</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="POLICECHIEFDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="city" entity-name="City" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="proxy" insert="true" update="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz245634.impl.CountryImpl" entity-name="Country" abstract="false" lazy="true" discriminator-value="Country" table="`COUNTRY`" proxy="org.eclipse.emf.teneo.samples.issues.bz245634.Country"> + <meta attribute="eclassName" inherit="false">Country</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz245634</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COUNTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280355Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280355Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4d29576d5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280355Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,30 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz280355.impl.LeiterImpl" entity-name="Leiter" abstract="false" lazy="false" table="`LEITER`"> + <meta attribute="eclassName" inherit="false">Leiter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz280355</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <many-to-one name="person" entity-name="Person" lazy="false" cascade="all" foreign-key="LEITER_PERSON" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PERSON_PERSON_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz280355.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz280355</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280355Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280355Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..7b60abf6c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280355Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,36 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz280355.impl.LeiterImpl" entity-name="Leiter" abstract="false" lazy="false" discriminator-value="Leiter" table="`LEITER`"> + <meta attribute="eclassName" inherit="false">Leiter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz280355</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LEITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <many-to-one name="person" entity-name="Person" lazy="false" cascade="all" foreign-key="LEITER_PERSON" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PERSON_PERSON_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz280355.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz280355</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280480Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280480Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c6c5aa0c3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280480Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,1033 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.w3._2000._09.xmldsig.impl.CanonicalizationMethodTypeImpl" entity-name="CanonicalizationMethodType" abstract="false" lazy="false" table="`CANONICALIZATIONMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">CanonicalizationMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`CANONICALIZATIONMETHODTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CANONICALIZATIONMETHODTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`CANONICALIZATIONMETHODTYPE_MIXED_IDX`"/> + <one-to-many entity-name="CanonicalizationMethodType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="CanonicalizationMethodType_mixed" lazy="false" table="`CANONICALIZATIONMETHODTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">CanonicalizationMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="any" table="`MIXED_CANONICALIZATIONMETHODTYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_CANONICALIZATIONMETHODTYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_CANONICALIZATIONMETHODTYPE_ANY_IDX`"/> + <one-to-many entity-name="CanonicalizationMethodType_any"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="CanonicalizationMethodType_any" lazy="false" table="`CANONICALIZATIONMETHODTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">CanonicalizationMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.DigestMethodTypeImpl" entity-name="DigestMethodType" abstract="false" lazy="false" table="`DIGESTMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">DigestMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`DIGESTMETHODTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DIGESTMETHODTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`DIGESTMETHODTYPE_MIXED_IDX`"/> + <one-to-many entity-name="DigestMethodType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="DigestMethodType_mixed" lazy="false" table="`DIGESTMETHODTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">DigestMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="any" table="`MIXED_DIGESTMETHODTYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DIGESTMETHODTYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_DIGESTMETHODTYPE_ANY_IDX`"/> + <one-to-many entity-name="DigestMethodType_any"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="DigestMethodType_any" lazy="false" table="`DIGESTMETHODTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">DigestMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.DSAKeyValueTypeImpl" entity-name="DSAKeyValueType" abstract="false" lazy="false" table="`DSAKEYVALUETYPE`"> + <meta attribute="eclassName" inherit="false">DSAKeyValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="p" table="`DSAKEYVALUETYPE_P`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_P_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_P_IDX`"/> + <element type="byte"/> + </array> + <array name="q" table="`DSAKEYVALUETYPE_Q`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_Q_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_Q_IDX`"/> + <element type="byte"/> + </array> + <array name="g" table="`DSAKEYVALUETYPE_G`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_G_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_G_IDX`"/> + <element type="byte"/> + </array> + <array name="y" table="`DSAKEYVALUETYPE_Y`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_Y_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_Y_IDX`"/> + <element type="byte"/> + </array> + <array name="j" table="`DSAKEYVALUETYPE_J`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_J_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_J_IDX`"/> + <element type="byte"/> + </array> + <array name="seed" table="`DSAKEYVALUETYPE_SEED`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_SEED_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_SEED_IDX`"/> + <element type="byte"/> + </array> + <array name="pgenCounter" table="`DSAKEYVALUETYPE_PGENCOUNTER`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_PGENCOUNTER_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_PGENCOUNTER_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.w3._2000._09.xmldsig.impl.KeyInfoTypeImpl" entity-name="KeyInfoType" abstract="false" lazy="false" table="`KEYINFOTYPE`"> + <meta attribute="eclassName" inherit="false">KeyInfoType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`KEYINFOTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`KEYINFOTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`KEYINFOTYPE_MIXED_IDX`"/> + <one-to-many entity-name="KeyInfoType_mixed"/> + </list> + </class> + <class entity-name="KeyInfoType_mixed" lazy="false" table="`KEYINFOTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">KeyInfoType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_KEYINFOTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_KEYINFOTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_KEYINFOTYPE_GROUP_IDX`"/> + <one-to-many entity-name="KeyInfoType_group"/> + </list> + <property name="keyName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_KEYNAME`"/> + </property> + <many-to-one name="keyValue" entity-name="KeyValueType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_KEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_KEYVALUETYPE_KEYVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="retrievalMethod" entity-name="RetrievalMethodType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_RETRIEVALMETHOD" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_RETRIEVALMETHODTYPE_RETRIEVALMETHOD_E_ID`"/> + </many-to-one> + <many-to-one name="x509Data" entity-name="X509DataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_X509DATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_X509DATATYPE_X509DATA_E_ID`"/> + </many-to-one> + <many-to-one name="pGPData" entity-name="PGPDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_PGPDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_PGPDATATYPE_PGPDATA_E_ID`"/> + </many-to-one> + <many-to-one name="sPKIData" entity-name="SPKIDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_SPKIDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_SPKIDATATYPE_SPKIDATA_E_ID`"/> + </many-to-one> + <property name="mgmtData" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_MGMTDATA`"/> + </property> + <many-to-one name="any" entity-name="KeyInfoType_any" cascade="all" not-null="false"/> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ID`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="KeyInfoType_group" lazy="false" table="`KEYINFOTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">KeyInfoType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="keyName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_KEYNAME`"/> + </property> + <many-to-one name="keyValue" entity-name="KeyValueType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_KEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_KEYVALUETYPE_KEYVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="retrievalMethod" entity-name="RetrievalMethodType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_RETRIEVALMETHOD" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_RETRIEVALMETHODTYPE_RETRIEVALMETHOD_E_ID`"/> + </many-to-one> + <many-to-one name="x509Data" entity-name="X509DataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_X509DATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_X509DATATYPE_X509DATA_E_ID`"/> + </many-to-one> + <many-to-one name="pGPData" entity-name="PGPDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_PGPDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_PGPDATATYPE_PGPDATA_E_ID`"/> + </many-to-one> + <many-to-one name="sPKIData" entity-name="SPKIDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_SPKIDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_SPKIDATATYPE_SPKIDATA_E_ID`"/> + </many-to-one> + <property name="mgmtData" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_MGMTDATA`"/> + </property> + <many-to-one name="any" entity-name="KeyInfoType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="KeyInfoType_any" lazy="false" table="`KEYINFOTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">KeyInfoType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.KeyValueTypeImpl" entity-name="KeyValueType" abstract="false" lazy="false" table="`KEYVALUETYPE`"> + <meta attribute="eclassName" inherit="false">KeyValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`KEYVALUETYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`KEYVALUETYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`KEYVALUETYPE_MIXED_IDX`"/> + <one-to-many entity-name="KeyValueType_mixed"/> + </list> + </class> + <class entity-name="KeyValueType_mixed" lazy="false" table="`KEYVALUETYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">KeyValueType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="dSAKeyValue" entity-name="DSAKeyValueType" lazy="false" cascade="all" foreign-key="KEYVALUETYPE_DSAKEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_DSAKEYVALUETYPE_DSAKEYVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="rSAKeyValue" entity-name="RSAKeyValueType" lazy="false" cascade="all" foreign-key="KEYVALUETYPE_RSAKEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_RSAKEYVALUETYPE_RSAKEYVALUE_E_ID`"/> + </many-to-one> + <list name="any" table="`MIXED_KEYVALUETYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_KEYVALUETYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_KEYVALUETYPE_ANY_IDX`"/> + <one-to-many entity-name="KeyValueType_any"/> + </list> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="KeyValueType_any" lazy="false" table="`KEYVALUETYPE_ANY`"> + <meta attribute="featureMap" inherit="false">KeyValueType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.ManifestTypeImpl" entity-name="ManifestType" abstract="false" lazy="false" table="`MANIFESTTYPE`"> + <meta attribute="eclassName" inherit="false">ManifestType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="reference" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MANIFESTTYPE_REFERENCE"> + <column name="`MANIFESTTYPE_REFERENCE_E_ID`" unique="false"/> + </key> + <list-index column="`MANIFESTTYPE_REFERENCE_IDX`"/> + <one-to-many entity-name="ReferenceType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.ObjectTypeImpl" entity-name="ObjectType" abstract="false" lazy="false" table="`OBJECTTYPE`"> + <meta attribute="eclassName" inherit="false">ObjectType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`OBJECTTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`OBJECTTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`OBJECTTYPE_MIXED_IDX`"/> + <one-to-many entity-name="ObjectType_mixed"/> + </list> + <property name="encoding" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ENCODING`"/> + </property> + <property name="mimeType" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIMETYPE`"/> + </property> + </class> + <class entity-name="ObjectType_mixed" lazy="false" table="`OBJECTTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">ObjectType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_OBJECTTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_OBJECTTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_OBJECTTYPE_GROUP_IDX`"/> + <one-to-many entity-name="ObjectType_group"/> + </list> + <many-to-one name="any" entity-name="ObjectType_any" cascade="all" not-null="false"/> + <property name="encoding" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ENCODING`"/> + </property> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ID`"/> + </property> + <property name="mimeType" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_MIMETYPE`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="ObjectType_group" lazy="false" table="`OBJECTTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">ObjectType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any" entity-name="ObjectType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="ObjectType_any" lazy="false" table="`OBJECTTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">ObjectType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.PGPDataTypeImpl" entity-name="PGPDataType" abstract="false" lazy="false" table="`PGPDATATYPE`"> + <meta attribute="eclassName" inherit="false">PGPDataType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="pGPKeyID" table="`PGPDATATYPE_PGPKEYID`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_PGPKEYID_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_PGPKEYID_IDX`"/> + <element type="byte"/> + </array> + <array name="pGPKeyPacket" table="`PGPDATATYPE_PGPKEYPACKET`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_PGPKEYPACKET_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_PGPKEYPACKET_IDX`"/> + <element type="byte"/> + </array> + <list name="any" table="`PGPDATATYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_ANY_IDX`"/> + <one-to-many entity-name="PGPDataType_any"/> + </list> + <array name="pGPKeyPacket1" table="`PGPDATATYPE_PGPKEYPACKET1`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_PGPKEYPACKET1_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_PGPKEYPACKET1_IDX`"/> + <element type="byte"/> + </array> + <list name="any1" table="`PGPDATATYPE_ANY1`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_ANY1_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_ANY1_IDX`"/> + <one-to-many entity-name="PGPDataType_any1"/> + </list> + </class> + <class entity-name="PGPDataType_any" lazy="false" table="`PGPDATATYPE_ANY`"> + <meta attribute="featureMap" inherit="false">PGPDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class entity-name="PGPDataType_any1" lazy="false" table="`PGPDATATYPE_ANY1`"> + <meta attribute="featureMap" inherit="false">PGPDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any1_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any1_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY1_TYPE`"/> + <column not-null="false" unique="false" name="`ANY1_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.ReferenceTypeImpl" entity-name="ReferenceType" abstract="false" lazy="false" table="`REFERENCETYPE`"> + <meta attribute="eclassName" inherit="false">ReferenceType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="transforms" entity-name="TransformsType" lazy="false" cascade="all" foreign-key="REFERENCETYPE_TRANSFORMS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TRANSFORMSTYPE_TRANSFORMS_E_ID`"/> + </many-to-one> + <many-to-one name="digestMethod" entity-name="DigestMethodType" lazy="false" cascade="all" foreign-key="REFERENCETYPE_DIGESTMETHOD" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`DIGESTMETHODTYPE_DIGESTMETHOD_E_ID`"/> + </many-to-one> + <array name="digestValue" table="`REFERENCETYPE_DIGESTVALUE`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`REFERENCETYPE_DIGESTVALUE_E_ID`" unique="false"/> + </key> + <list-index column="`REFERENCETYPE_DIGESTVALUE_IDX`"/> + <element type="byte"/> + </array> + <property name="type" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TYPE`"/> + </property> + <property name="uRI" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`URI`"/> + </property> + </class> + <class name="org.w3._2000._09.xmldsig.impl.RetrievalMethodTypeImpl" entity-name="RetrievalMethodType" abstract="false" lazy="false" table="`RETRIEVALMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">RetrievalMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="transforms" entity-name="TransformsType" lazy="false" cascade="all" foreign-key="RETRIEVALMETHODTYPE_TRANSFORMS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TRANSFORMSTYPE_TRANSFORMS_E_ID`"/> + </many-to-one> + <property name="type" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TYPE`"/> + </property> + <property name="uRI" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`URI`"/> + </property> + </class> + <class name="org.w3._2000._09.xmldsig.impl.RSAKeyValueTypeImpl" entity-name="RSAKeyValueType" abstract="false" lazy="false" table="`RSAKEYVALUETYPE`"> + <meta attribute="eclassName" inherit="false">RSAKeyValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="modulus" table="`RSAKEYVALUETYPE_MODULUS`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`RSAKEYVALUETYPE_MODULUS_E_ID`" unique="false"/> + </key> + <list-index column="`RSAKEYVALUETYPE_MODULUS_IDX`"/> + <element type="byte"/> + </array> + <array name="exponent" table="`RSAKEYVALUETYPE_EXPONENT`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`RSAKEYVALUETYPE_EXPONENT_E_ID`" unique="false"/> + </key> + <list-index column="`RSAKEYVALUETYPE_EXPONENT_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignatureMethodTypeImpl" entity-name="SignatureMethodType" abstract="false" lazy="false" table="`SIGNATUREMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">SignatureMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`SIGNATUREMETHODTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIGNATUREMETHODTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREMETHODTYPE_MIXED_IDX`"/> + <one-to-many entity-name="SignatureMethodType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="SignatureMethodType_mixed" lazy="false" table="`SIGNATUREMETHODTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">SignatureMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="hMACOutputLength" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MIXED_HMACOUTPUTLENGTH`"/> + </property> + <list name="any" table="`MIXED_SIGNATUREMETHODTYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_SIGNATUREMETHODTYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_SIGNATUREMETHODTYPE_ANY_IDX`"/> + <one-to-many entity-name="SignatureMethodType_any"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="SignatureMethodType_any" lazy="false" table="`SIGNATUREMETHODTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">SignatureMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignaturePropertiesTypeImpl" entity-name="SignaturePropertiesType" abstract="false" lazy="false" table="`SIGNATUREPROPERTIESTYPE`"> + <meta attribute="eclassName" inherit="false">SignaturePropertiesType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="signatureProperty" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SIGNATUREPROPERTIESTYPE_SIGNATUREPROPERTY"> + <column name="`SIGNATUREPROPERTIESTYPE_SIGNATUREPROPERTY_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREPROPERTIESTYPE_SIGNATUREPROPERTY_IDX`"/> + <one-to-many entity-name="SignaturePropertyType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignaturePropertyTypeImpl" entity-name="SignaturePropertyType" abstract="false" lazy="false" table="`SIGNATUREPROPERTYTYPE`"> + <meta attribute="eclassName" inherit="false">SignaturePropertyType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`SIGNATUREPROPERTYTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIGNATUREPROPERTYTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREPROPERTYTYPE_MIXED_IDX`"/> + <one-to-many entity-name="SignaturePropertyType_mixed"/> + </list> + <property name="target" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TARGET`"/> + </property> + </class> + <class entity-name="SignaturePropertyType_mixed" lazy="false" table="`SIGNATUREPROPERTYTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">SignaturePropertyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_SIGNATUREPROPERTYTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_SIGNATUREPROPERTYTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_SIGNATUREPROPERTYTYPE_GROUP_IDX`"/> + <one-to-many entity-name="SignaturePropertyType_group"/> + </list> + <many-to-one name="any" entity-name="SignaturePropertyType_any" cascade="all" not-null="false"/> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ID`"/> + </property> + <property name="target" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_TARGET`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="SignaturePropertyType_group" lazy="false" table="`SIGNATUREPROPERTYTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SignaturePropertyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any" entity-name="SignaturePropertyType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="SignaturePropertyType_any" lazy="false" table="`SIGNATUREPROPERTYTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">SignaturePropertyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignatureTypeImpl" entity-name="SignatureType" abstract="false" lazy="false" table="`SIGNATURETYPE`"> + <meta attribute="eclassName" inherit="false">SignatureType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="signedInfo" entity-name="SignedInfoType" lazy="false" cascade="all" foreign-key="SIGNATURETYPE_SIGNEDINFO" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`SIGNEDINFOTYPE_SIGNEDINFO_E_ID`"/> + </many-to-one> + <many-to-one name="signatureValue" entity-name="SignatureValueType" lazy="false" cascade="all" foreign-key="SIGNATURETYPE_SIGNATUREVALUE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`SIGNATUREVALUETYPE_SIGNATUREVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="keyInfo" entity-name="KeyInfoType" lazy="false" cascade="all" foreign-key="SIGNATURETYPE_KEYINFO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`KEYINFOTYPE_KEYINFO_ID`"/> + </many-to-one> + <list name="object" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SIGNATURETYPE_OBJECT"> + <column name="`SIGNATURETYPE_OBJECT_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATURETYPE_OBJECT_IDX`"/> + <one-to-many entity-name="ObjectType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignatureValueTypeImpl" entity-name="SignatureValueType" abstract="false" lazy="false" table="`SIGNATUREVALUETYPE`"> + <meta attribute="eclassName" inherit="false">SignatureValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="value" table="`SIGNATUREVALUETYPE_VALUE`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIGNATUREVALUETYPE_VALUE_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREVALUETYPE_VALUE_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignedInfoTypeImpl" entity-name="SignedInfoType" abstract="false" lazy="false" table="`SIGNEDINFOTYPE`"> + <meta attribute="eclassName" inherit="false">SignedInfoType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="canonicalizationMethod" entity-name="CanonicalizationMethodType" lazy="false" cascade="all" foreign-key="SIGNEDINFOTYPE_CANONICALIZATIONMETHOD" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`CANONICALIZATIONMETHODTYPE_CANONICALIZATIONMETHOD_E_ID`"/> + </many-to-one> + <many-to-one name="signatureMethod" entity-name="SignatureMethodType" lazy="false" cascade="all" foreign-key="SIGNEDINFOTYPE_SIGNATUREMETHOD" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`SIGNATUREMETHODTYPE_SIGNATUREMETHOD_E_ID`"/> + </many-to-one> + <list name="reference" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SIGNEDINFOTYPE_REFERENCE"> + <column name="`SIGNEDINFOTYPE_REFERENCE_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNEDINFOTYPE_REFERENCE_IDX`"/> + <one-to-many entity-name="ReferenceType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SPKIDataTypeImpl" entity-name="SPKIDataType" abstract="false" lazy="false" table="`SPKIDATATYPE`"> + <meta attribute="eclassName" inherit="false">SPKIDataType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`SPKIDATATYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SPKIDATATYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`SPKIDATATYPE_GROUP_IDX`"/> + <one-to-many entity-name="SPKIDataType_group"/> + </list> + </class> + <class entity-name="SPKIDataType_group" lazy="false" table="`SPKIDATATYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SPKIDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="sPKISexp" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_SPKISEXP`"/> + </property> + <many-to-one name="any" entity-name="SPKIDataType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="SPKIDataType_any" lazy="false" table="`SPKIDATATYPE_ANY`"> + <meta attribute="featureMap" inherit="false">SPKIDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.TransformsTypeImpl" entity-name="TransformsType" abstract="false" lazy="false" table="`TRANSFORMSTYPE`"> + <meta attribute="eclassName" inherit="false">TransformsType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="transform" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TRANSFORMSTYPE_TRANSFORM"> + <column name="`TRANSFORMSTYPE_TRANSFORM_E_ID`" unique="false"/> + </key> + <list-index column="`TRANSFORMSTYPE_TRANSFORM_IDX`"/> + <one-to-many entity-name="TransformType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.TransformTypeImpl" entity-name="TransformType" abstract="false" lazy="false" table="`TRANSFORMTYPE`"> + <meta attribute="eclassName" inherit="false">TransformType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`TRANSFORMTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TRANSFORMTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`TRANSFORMTYPE_MIXED_IDX`"/> + <one-to-many entity-name="TransformType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="TransformType_mixed" lazy="false" table="`TRANSFORMTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">TransformType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_TRANSFORMTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_TRANSFORMTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_TRANSFORMTYPE_GROUP_IDX`"/> + <one-to-many entity-name="TransformType_group"/> + </list> + <many-to-one name="any" entity-name="TransformType_any" cascade="all" not-null="false"/> + <property name="xPath" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_XPATH`"/> + </property> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="TransformType_group" lazy="false" table="`TRANSFORMTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">TransformType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any" entity-name="TransformType_any" cascade="all" not-null="false"/> + <property name="xPath" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_XPATH`"/> + </property> + </class> + <class entity-name="TransformType_any" lazy="false" table="`TRANSFORMTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">TransformType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.X509DataTypeImpl" entity-name="X509DataType" abstract="false" lazy="false" table="`X509DATATYPE`"> + <meta attribute="eclassName" inherit="false">X509DataType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`X509DATATYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`X509DATATYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`X509DATATYPE_GROUP_IDX`"/> + <one-to-many entity-name="X509DataType_group"/> + </list> + </class> + <class entity-name="X509DataType_group" lazy="false" table="`X509DATATYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">X509DataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="x509IssuerSerial" entity-name="X509IssuerSerialType" lazy="false" cascade="all" foreign-key="X509DATATYPE_X509ISSUERSERIAL" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_X509ISSUERSERIALTYPE_X509ISSUERSERIAL_E_ID`"/> + </many-to-one> + <property name="x509SKI" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_X509SKI`"/> + </property> + <property name="x509SubjectName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_X509SUBJECTNAME`"/> + </property> + <property name="x509Certificate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_X509CERTIFICATE`"/> + </property> + <property name="x509CRL" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_X509CRL`"/> + </property> + <many-to-one name="any" entity-name="X509DataType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="X509DataType_any" lazy="false" table="`X509DATATYPE_ANY`"> + <meta attribute="featureMap" inherit="false">X509DataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.X509IssuerSerialTypeImpl" entity-name="X509IssuerSerialType" abstract="false" lazy="false" table="`X509ISSUERSERIALTYPE`"> + <meta attribute="eclassName" inherit="false">X509IssuerSerialType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="x509IssuerName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`X509ISSUERNAME`"/> + </property> + <property name="x509SerialNumber" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`X509SERIALNUMBER`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280480Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280480Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..d452b3336 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz280480Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,1099 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.w3._2000._09.xmldsig.impl.CanonicalizationMethodTypeImpl" entity-name="CanonicalizationMethodType" abstract="false" lazy="false" discriminator-value="CanonicalizationMethodType" table="`CANONICALIZATIONMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">CanonicalizationMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CANONICALIZATIONMETHODTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`CANONICALIZATIONMETHODTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CANONICALIZATIONMETHODTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`CANONICALIZATIONMETHODTYPE_MIXED_IDX`"/> + <one-to-many entity-name="CanonicalizationMethodType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="CanonicalizationMethodType_mixed" lazy="false" table="`CANONICALIZATIONMETHODTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">CanonicalizationMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="any" table="`MIXED_CANONICALIZATIONMETHODTYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_CANONICALIZATIONMETHODTYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_CANONICALIZATIONMETHODTYPE_ANY_IDX`"/> + <one-to-many entity-name="CanonicalizationMethodType_any"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="CanonicalizationMethodType_any" lazy="false" table="`CANONICALIZATIONMETHODTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">CanonicalizationMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.DigestMethodTypeImpl" entity-name="DigestMethodType" abstract="false" lazy="false" discriminator-value="DigestMethodType" table="`DIGESTMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">DigestMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DIGESTMETHODTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`DIGESTMETHODTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DIGESTMETHODTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`DIGESTMETHODTYPE_MIXED_IDX`"/> + <one-to-many entity-name="DigestMethodType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="DigestMethodType_mixed" lazy="false" table="`DIGESTMETHODTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">DigestMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="any" table="`MIXED_DIGESTMETHODTYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DIGESTMETHODTYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_DIGESTMETHODTYPE_ANY_IDX`"/> + <one-to-many entity-name="DigestMethodType_any"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="DigestMethodType_any" lazy="false" table="`DIGESTMETHODTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">DigestMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.DSAKeyValueTypeImpl" entity-name="DSAKeyValueType" abstract="false" lazy="false" discriminator-value="DSAKeyValueType" table="`DSAKEYVALUETYPE`"> + <meta attribute="eclassName" inherit="false">DSAKeyValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DSAKEYVALUETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="p" table="`DSAKEYVALUETYPE_P`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_P_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_P_IDX`"/> + <element type="byte"/> + </array> + <array name="q" table="`DSAKEYVALUETYPE_Q`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_Q_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_Q_IDX`"/> + <element type="byte"/> + </array> + <array name="g" table="`DSAKEYVALUETYPE_G`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_G_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_G_IDX`"/> + <element type="byte"/> + </array> + <array name="y" table="`DSAKEYVALUETYPE_Y`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_Y_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_Y_IDX`"/> + <element type="byte"/> + </array> + <array name="j" table="`DSAKEYVALUETYPE_J`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_J_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_J_IDX`"/> + <element type="byte"/> + </array> + <array name="seed" table="`DSAKEYVALUETYPE_SEED`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_SEED_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_SEED_IDX`"/> + <element type="byte"/> + </array> + <array name="pgenCounter" table="`DSAKEYVALUETYPE_PGENCOUNTER`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DSAKEYVALUETYPE_PGENCOUNTER_E_ID`" unique="false"/> + </key> + <list-index column="`DSAKEYVALUETYPE_PGENCOUNTER_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.w3._2000._09.xmldsig.impl.KeyInfoTypeImpl" entity-name="KeyInfoType" abstract="false" lazy="false" discriminator-value="KeyInfoType" table="`KEYINFOTYPE`"> + <meta attribute="eclassName" inherit="false">KeyInfoType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="KEYINFOTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`KEYINFOTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`KEYINFOTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`KEYINFOTYPE_MIXED_IDX`"/> + <one-to-many entity-name="KeyInfoType_mixed"/> + </list> + </class> + <class entity-name="KeyInfoType_mixed" lazy="false" table="`KEYINFOTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">KeyInfoType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_KEYINFOTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_KEYINFOTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_KEYINFOTYPE_GROUP_IDX`"/> + <one-to-many entity-name="KeyInfoType_group"/> + </list> + <property name="keyName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_KEYNAME`"/> + </property> + <many-to-one name="keyValue" entity-name="KeyValueType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_KEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_KEYVALUETYPE_KEYVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="retrievalMethod" entity-name="RetrievalMethodType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_RETRIEVALMETHOD" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_RETRIEVALMETHODTYPE_RETRIEVALMETHOD_E_ID`"/> + </many-to-one> + <many-to-one name="x509Data" entity-name="X509DataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_X509DATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_X509DATATYPE_X509DATA_E_ID`"/> + </many-to-one> + <many-to-one name="pGPData" entity-name="PGPDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_PGPDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_PGPDATATYPE_PGPDATA_E_ID`"/> + </many-to-one> + <many-to-one name="sPKIData" entity-name="SPKIDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_SPKIDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_SPKIDATATYPE_SPKIDATA_E_ID`"/> + </many-to-one> + <property name="mgmtData" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_MGMTDATA`"/> + </property> + <many-to-one name="any" entity-name="KeyInfoType_any" cascade="all" not-null="false"/> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ID`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="KeyInfoType_group" lazy="false" table="`KEYINFOTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">KeyInfoType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="keyName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_KEYNAME`"/> + </property> + <many-to-one name="keyValue" entity-name="KeyValueType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_KEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_KEYVALUETYPE_KEYVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="retrievalMethod" entity-name="RetrievalMethodType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_RETRIEVALMETHOD" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_RETRIEVALMETHODTYPE_RETRIEVALMETHOD_E_ID`"/> + </many-to-one> + <many-to-one name="x509Data" entity-name="X509DataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_X509DATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_X509DATATYPE_X509DATA_E_ID`"/> + </many-to-one> + <many-to-one name="pGPData" entity-name="PGPDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_PGPDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_PGPDATATYPE_PGPDATA_E_ID`"/> + </many-to-one> + <many-to-one name="sPKIData" entity-name="SPKIDataType" lazy="false" cascade="all" foreign-key="KEYINFOTYPE_SPKIDATA" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_SPKIDATATYPE_SPKIDATA_E_ID`"/> + </many-to-one> + <property name="mgmtData" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_MGMTDATA`"/> + </property> + <many-to-one name="any" entity-name="KeyInfoType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="KeyInfoType_any" lazy="false" table="`KEYINFOTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">KeyInfoType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.KeyValueTypeImpl" entity-name="KeyValueType" abstract="false" lazy="false" discriminator-value="KeyValueType" table="`KEYVALUETYPE`"> + <meta attribute="eclassName" inherit="false">KeyValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="KEYVALUETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`KEYVALUETYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`KEYVALUETYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`KEYVALUETYPE_MIXED_IDX`"/> + <one-to-many entity-name="KeyValueType_mixed"/> + </list> + </class> + <class entity-name="KeyValueType_mixed" lazy="false" table="`KEYVALUETYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">KeyValueType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="dSAKeyValue" entity-name="DSAKeyValueType" lazy="false" cascade="all" foreign-key="KEYVALUETYPE_DSAKEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_DSAKEYVALUETYPE_DSAKEYVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="rSAKeyValue" entity-name="RSAKeyValueType" lazy="false" cascade="all" foreign-key="KEYVALUETYPE_RSAKEYVALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_RSAKEYVALUETYPE_RSAKEYVALUE_E_ID`"/> + </many-to-one> + <list name="any" table="`MIXED_KEYVALUETYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_KEYVALUETYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_KEYVALUETYPE_ANY_IDX`"/> + <one-to-many entity-name="KeyValueType_any"/> + </list> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="KeyValueType_any" lazy="false" table="`KEYVALUETYPE_ANY`"> + <meta attribute="featureMap" inherit="false">KeyValueType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.ManifestTypeImpl" entity-name="ManifestType" abstract="false" lazy="false" discriminator-value="ManifestType" table="`MANIFESTTYPE`"> + <meta attribute="eclassName" inherit="false">ManifestType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANIFESTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="reference" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MANIFESTTYPE_REFERENCE"> + <column name="`MANIFESTTYPE_REFERENCE_E_ID`" unique="false"/> + </key> + <list-index column="`MANIFESTTYPE_REFERENCE_IDX`"/> + <one-to-many entity-name="ReferenceType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.ObjectTypeImpl" entity-name="ObjectType" abstract="false" lazy="false" discriminator-value="ObjectType" table="`OBJECTTYPE`"> + <meta attribute="eclassName" inherit="false">ObjectType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="OBJECTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`OBJECTTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`OBJECTTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`OBJECTTYPE_MIXED_IDX`"/> + <one-to-many entity-name="ObjectType_mixed"/> + </list> + <property name="encoding" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ENCODING`"/> + </property> + <property name="mimeType" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIMETYPE`"/> + </property> + </class> + <class entity-name="ObjectType_mixed" lazy="false" table="`OBJECTTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">ObjectType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_OBJECTTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_OBJECTTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_OBJECTTYPE_GROUP_IDX`"/> + <one-to-many entity-name="ObjectType_group"/> + </list> + <many-to-one name="any" entity-name="ObjectType_any" cascade="all" not-null="false"/> + <property name="encoding" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ENCODING`"/> + </property> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ID`"/> + </property> + <property name="mimeType" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_MIMETYPE`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="ObjectType_group" lazy="false" table="`OBJECTTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">ObjectType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any" entity-name="ObjectType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="ObjectType_any" lazy="false" table="`OBJECTTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">ObjectType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.PGPDataTypeImpl" entity-name="PGPDataType" abstract="false" lazy="false" discriminator-value="PGPDataType" table="`PGPDATATYPE`"> + <meta attribute="eclassName" inherit="false">PGPDataType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PGPDATATYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="pGPKeyID" table="`PGPDATATYPE_PGPKEYID`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_PGPKEYID_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_PGPKEYID_IDX`"/> + <element type="byte"/> + </array> + <array name="pGPKeyPacket" table="`PGPDATATYPE_PGPKEYPACKET`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_PGPKEYPACKET_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_PGPKEYPACKET_IDX`"/> + <element type="byte"/> + </array> + <list name="any" table="`PGPDATATYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_ANY_IDX`"/> + <one-to-many entity-name="PGPDataType_any"/> + </list> + <array name="pGPKeyPacket1" table="`PGPDATATYPE_PGPKEYPACKET1`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_PGPKEYPACKET1_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_PGPKEYPACKET1_IDX`"/> + <element type="byte"/> + </array> + <list name="any1" table="`PGPDATATYPE_ANY1`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PGPDATATYPE_ANY1_E_ID`" unique="false"/> + </key> + <list-index column="`PGPDATATYPE_ANY1_IDX`"/> + <one-to-many entity-name="PGPDataType_any1"/> + </list> + </class> + <class entity-name="PGPDataType_any" lazy="false" table="`PGPDATATYPE_ANY`"> + <meta attribute="featureMap" inherit="false">PGPDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class entity-name="PGPDataType_any1" lazy="false" table="`PGPDATATYPE_ANY1`"> + <meta attribute="featureMap" inherit="false">PGPDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any1_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any1_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY1_TYPE`"/> + <column not-null="false" unique="false" name="`ANY1_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.ReferenceTypeImpl" entity-name="ReferenceType" abstract="false" lazy="false" discriminator-value="ReferenceType" table="`REFERENCETYPE`"> + <meta attribute="eclassName" inherit="false">ReferenceType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="REFERENCETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="transforms" entity-name="TransformsType" lazy="false" cascade="all" foreign-key="REFERENCETYPE_TRANSFORMS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TRANSFORMSTYPE_TRANSFORMS_E_ID`"/> + </many-to-one> + <many-to-one name="digestMethod" entity-name="DigestMethodType" lazy="false" cascade="all" foreign-key="REFERENCETYPE_DIGESTMETHOD" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`DIGESTMETHODTYPE_DIGESTMETHOD_E_ID`"/> + </many-to-one> + <array name="digestValue" table="`REFERENCETYPE_DIGESTVALUE`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`REFERENCETYPE_DIGESTVALUE_E_ID`" unique="false"/> + </key> + <list-index column="`REFERENCETYPE_DIGESTVALUE_IDX`"/> + <element type="byte"/> + </array> + <property name="type" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TYPE`"/> + </property> + <property name="uRI" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`URI`"/> + </property> + </class> + <class name="org.w3._2000._09.xmldsig.impl.RetrievalMethodTypeImpl" entity-name="RetrievalMethodType" abstract="false" lazy="false" discriminator-value="RetrievalMethodType" table="`RETRIEVALMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">RetrievalMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RETRIEVALMETHODTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="transforms" entity-name="TransformsType" lazy="false" cascade="all" foreign-key="RETRIEVALMETHODTYPE_TRANSFORMS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TRANSFORMSTYPE_TRANSFORMS_E_ID`"/> + </many-to-one> + <property name="type" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TYPE`"/> + </property> + <property name="uRI" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`URI`"/> + </property> + </class> + <class name="org.w3._2000._09.xmldsig.impl.RSAKeyValueTypeImpl" entity-name="RSAKeyValueType" abstract="false" lazy="false" discriminator-value="RSAKeyValueType" table="`RSAKEYVALUETYPE`"> + <meta attribute="eclassName" inherit="false">RSAKeyValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RSAKEYVALUETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="modulus" table="`RSAKEYVALUETYPE_MODULUS`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`RSAKEYVALUETYPE_MODULUS_E_ID`" unique="false"/> + </key> + <list-index column="`RSAKEYVALUETYPE_MODULUS_IDX`"/> + <element type="byte"/> + </array> + <array name="exponent" table="`RSAKEYVALUETYPE_EXPONENT`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`RSAKEYVALUETYPE_EXPONENT_E_ID`" unique="false"/> + </key> + <list-index column="`RSAKEYVALUETYPE_EXPONENT_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignatureMethodTypeImpl" entity-name="SignatureMethodType" abstract="false" lazy="false" discriminator-value="SignatureMethodType" table="`SIGNATUREMETHODTYPE`"> + <meta attribute="eclassName" inherit="false">SignatureMethodType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIGNATUREMETHODTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`SIGNATUREMETHODTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIGNATUREMETHODTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREMETHODTYPE_MIXED_IDX`"/> + <one-to-many entity-name="SignatureMethodType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="SignatureMethodType_mixed" lazy="false" table="`SIGNATUREMETHODTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">SignatureMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="hMACOutputLength" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MIXED_HMACOUTPUTLENGTH`"/> + </property> + <list name="any" table="`MIXED_SIGNATUREMETHODTYPE_ANY`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_SIGNATUREMETHODTYPE_ANY_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_SIGNATUREMETHODTYPE_ANY_IDX`"/> + <one-to-many entity-name="SignatureMethodType_any"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="SignatureMethodType_any" lazy="false" table="`SIGNATUREMETHODTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">SignatureMethodType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignaturePropertiesTypeImpl" entity-name="SignaturePropertiesType" abstract="false" lazy="false" discriminator-value="SignaturePropertiesType" table="`SIGNATUREPROPERTIESTYPE`"> + <meta attribute="eclassName" inherit="false">SignaturePropertiesType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIGNATUREPROPERTIESTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="signatureProperty" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SIGNATUREPROPERTIESTYPE_SIGNATUREPROPERTY"> + <column name="`SIGNATUREPROPERTIESTYPE_SIGNATUREPROPERTY_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREPROPERTIESTYPE_SIGNATUREPROPERTY_IDX`"/> + <one-to-many entity-name="SignaturePropertyType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignaturePropertyTypeImpl" entity-name="SignaturePropertyType" abstract="false" lazy="false" discriminator-value="SignaturePropertyType" table="`SIGNATUREPROPERTYTYPE`"> + <meta attribute="eclassName" inherit="false">SignaturePropertyType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIGNATUREPROPERTYTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`SIGNATUREPROPERTYTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIGNATUREPROPERTYTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREPROPERTYTYPE_MIXED_IDX`"/> + <one-to-many entity-name="SignaturePropertyType_mixed"/> + </list> + <property name="target" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TARGET`"/> + </property> + </class> + <class entity-name="SignaturePropertyType_mixed" lazy="false" table="`SIGNATUREPROPERTYTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">SignaturePropertyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_SIGNATUREPROPERTYTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_SIGNATUREPROPERTYTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_SIGNATUREPROPERTYTYPE_GROUP_IDX`"/> + <one-to-many entity-name="SignaturePropertyType_group"/> + </list> + <many-to-one name="any" entity-name="SignaturePropertyType_any" cascade="all" not-null="false"/> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ID`"/> + </property> + <property name="target" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_TARGET`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="SignaturePropertyType_group" lazy="false" table="`SIGNATUREPROPERTYTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SignaturePropertyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any" entity-name="SignaturePropertyType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="SignaturePropertyType_any" lazy="false" table="`SIGNATUREPROPERTYTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">SignaturePropertyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignatureTypeImpl" entity-name="SignatureType" abstract="false" lazy="false" discriminator-value="SignatureType" table="`SIGNATURETYPE`"> + <meta attribute="eclassName" inherit="false">SignatureType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIGNATURETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="signedInfo" entity-name="SignedInfoType" lazy="false" cascade="all" foreign-key="SIGNATURETYPE_SIGNEDINFO" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`SIGNEDINFOTYPE_SIGNEDINFO_E_ID`"/> + </many-to-one> + <many-to-one name="signatureValue" entity-name="SignatureValueType" lazy="false" cascade="all" foreign-key="SIGNATURETYPE_SIGNATUREVALUE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`SIGNATUREVALUETYPE_SIGNATUREVALUE_E_ID`"/> + </many-to-one> + <many-to-one name="keyInfo" entity-name="KeyInfoType" lazy="false" cascade="all" foreign-key="SIGNATURETYPE_KEYINFO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`KEYINFOTYPE_KEYINFO_ID`"/> + </many-to-one> + <list name="object" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SIGNATURETYPE_OBJECT"> + <column name="`SIGNATURETYPE_OBJECT_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATURETYPE_OBJECT_IDX`"/> + <one-to-many entity-name="ObjectType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignatureValueTypeImpl" entity-name="SignatureValueType" abstract="false" lazy="false" discriminator-value="SignatureValueType" table="`SIGNATUREVALUETYPE`"> + <meta attribute="eclassName" inherit="false">SignatureValueType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIGNATUREVALUETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <array name="value" table="`SIGNATUREVALUETYPE_VALUE`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIGNATUREVALUETYPE_VALUE_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNATUREVALUETYPE_VALUE_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SignedInfoTypeImpl" entity-name="SignedInfoType" abstract="false" lazy="false" discriminator-value="SignedInfoType" table="`SIGNEDINFOTYPE`"> + <meta attribute="eclassName" inherit="false">SignedInfoType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIGNEDINFOTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="canonicalizationMethod" entity-name="CanonicalizationMethodType" lazy="false" cascade="all" foreign-key="SIGNEDINFOTYPE_CANONICALIZATIONMETHOD" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`CANONICALIZATIONMETHODTYPE_CANONICALIZATIONMETHOD_E_ID`"/> + </many-to-one> + <many-to-one name="signatureMethod" entity-name="SignatureMethodType" lazy="false" cascade="all" foreign-key="SIGNEDINFOTYPE_SIGNATUREMETHOD" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`SIGNATUREMETHODTYPE_SIGNATUREMETHOD_E_ID`"/> + </many-to-one> + <list name="reference" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="SIGNEDINFOTYPE_REFERENCE"> + <column name="`SIGNEDINFOTYPE_REFERENCE_E_ID`" unique="false"/> + </key> + <list-index column="`SIGNEDINFOTYPE_REFERENCE_IDX`"/> + <one-to-many entity-name="ReferenceType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.SPKIDataTypeImpl" entity-name="SPKIDataType" abstract="false" lazy="false" discriminator-value="SPKIDataType" table="`SPKIDATATYPE`"> + <meta attribute="eclassName" inherit="false">SPKIDataType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SPKIDATATYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`SPKIDATATYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SPKIDATATYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`SPKIDATATYPE_GROUP_IDX`"/> + <one-to-many entity-name="SPKIDataType_group"/> + </list> + </class> + <class entity-name="SPKIDataType_group" lazy="false" table="`SPKIDATATYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SPKIDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="sPKISexp" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_SPKISEXP`"/> + </property> + <many-to-one name="any" entity-name="SPKIDataType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="SPKIDataType_any" lazy="false" table="`SPKIDATATYPE_ANY`"> + <meta attribute="featureMap" inherit="false">SPKIDataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.TransformsTypeImpl" entity-name="TransformsType" abstract="false" lazy="false" discriminator-value="TransformsType" table="`TRANSFORMSTYPE`"> + <meta attribute="eclassName" inherit="false">TransformsType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TRANSFORMSTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="transform" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TRANSFORMSTYPE_TRANSFORM"> + <column name="`TRANSFORMSTYPE_TRANSFORM_E_ID`" unique="false"/> + </key> + <list-index column="`TRANSFORMSTYPE_TRANSFORM_IDX`"/> + <one-to-many entity-name="TransformType"/> + </list> + </class> + <class name="org.w3._2000._09.xmldsig.impl.TransformTypeImpl" entity-name="TransformType" abstract="false" lazy="false" discriminator-value="TransformType" table="`TRANSFORMTYPE`"> + <meta attribute="eclassName" inherit="false">TransformType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TRANSFORMTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`TRANSFORMTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TRANSFORMTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`TRANSFORMTYPE_MIXED_IDX`"/> + <one-to-many entity-name="TransformType_mixed"/> + </list> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALGORITHM`"/> + </property> + </class> + <class entity-name="TransformType_mixed" lazy="false" table="`TRANSFORMTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">TransformType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <list name="group" table="`MIXED_TRANSFORMTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_TRANSFORMTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_TRANSFORMTYPE_GROUP_IDX`"/> + <one-to-many entity-name="TransformType_group"/> + </list> + <many-to-one name="any" entity-name="TransformType_any" cascade="all" not-null="false"/> + <property name="xPath" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_XPATH`"/> + </property> + <property name="algorithm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ALGORITHM`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="TransformType_group" lazy="false" table="`TRANSFORMTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">TransformType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="any" entity-name="TransformType_any" cascade="all" not-null="false"/> + <property name="xPath" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_XPATH`"/> + </property> + </class> + <class entity-name="TransformType_any" lazy="false" table="`TRANSFORMTYPE_ANY`"> + <meta attribute="featureMap" inherit="false">TransformType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.X509DataTypeImpl" entity-name="X509DataType" abstract="false" lazy="false" discriminator-value="X509DataType" table="`X509DATATYPE`"> + <meta attribute="eclassName" inherit="false">X509DataType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="X509DATATYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`X509DATATYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`X509DATATYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`X509DATATYPE_GROUP_IDX`"/> + <one-to-many entity-name="X509DataType_group"/> + </list> + </class> + <class entity-name="X509DataType_group" lazy="false" table="`X509DATATYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">X509DataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="x509IssuerSerial" entity-name="X509IssuerSerialType" lazy="false" cascade="all" foreign-key="X509DATATYPE_X509ISSUERSERIAL" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_X509ISSUERSERIALTYPE_X509ISSUERSERIAL_E_ID`"/> + </many-to-one> + <property name="x509SKI" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_X509SKI`"/> + </property> + <property name="x509SubjectName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_X509SUBJECTNAME`"/> + </property> + <property name="x509Certificate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_X509CERTIFICATE`"/> + </property> + <property name="x509CRL" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`GROUP_X509CRL`"/> + </property> + <many-to-one name="any" entity-name="X509DataType_any" cascade="all" not-null="false"/> + </class> + <class entity-name="X509DataType_any" lazy="false" table="`X509DATATYPE_ANY`"> + <meta attribute="featureMap" inherit="false">X509DataType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="any_fme_any_data" type="java.lang.String"/> + <any id-type="long" meta-type="string" name="any_fme_any_reference" cascade="all"> + <column not-null="false" unique="false" name="`ANY_TYPE`"/> + <column not-null="false" unique="false" name="`ANY_ID`"/> + </any> + </class> + <class name="org.w3._2000._09.xmldsig.impl.X509IssuerSerialTypeImpl" entity-name="X509IssuerSerialType" abstract="false" lazy="false" discriminator-value="X509IssuerSerialType" table="`X509ISSUERSERIALTYPE`"> + <meta attribute="eclassName" inherit="false">X509IssuerSerialType</meta> + <meta attribute="epackage" inherit="false">http://www.w3.org/2000/09/xmldsig#</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="X509ISSUERSERIALTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="x509IssuerName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`X509ISSUERNAME`"/> + </property> + <property name="x509SerialNumber" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`X509SERIALNUMBER`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz281730Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz281730Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..02f9b0828 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz281730Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,86 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.library.Book" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.library.Library" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.library.Writer" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz281730Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz281730Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0e8b76834 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz281730Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.library.Book" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.library.Library" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.library.Writer" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz282414Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz282414Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7b451d308 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz282414Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz282414.impl.BarImpl" entity-name="Bar" abstract="false" lazy="false" table="`BAR_TABLE`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz282414</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <component name="barKey" class="org.eclipse.emf.teneo.samples.issues.bz282414.impl.BarKeyImpl"> + <meta attribute="eclassName" inherit="false">BarKey</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz282414</meta> + <property name="classId" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLAS_ID`"/> + </property> + <property name="groupId" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GRP_ID`"/> + </property> + </component> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz282414.impl.FooImpl" entity-name="Foo" abstract="false" lazy="false" table="`FOO_TABLE`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz282414</meta> + <id name="dnmSK" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`DNM_SK`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="bagOfBars" lazy="true" cascade="all,delete-orphan"> + <key update="true" property-ref="clientId" foreign-key="FOO_BAGOFBARS"> + <column name="`GRP_ID`" unique="false"/> + </key> + <one-to-many entity-name="Bar"/> + </bag> + <property name="clientId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLI_ID`" length="8"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz282414Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz282414Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..1c262643d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz282414Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,52 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz282414.impl.BarImpl" entity-name="Bar" abstract="false" lazy="false" discriminator-value="Bar" table="`BAR_TABLE`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz282414</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BAR_TABLEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <component name="barKey" class="org.eclipse.emf.teneo.samples.issues.bz282414.impl.BarKeyImpl"> + <meta attribute="eclassName" inherit="false">BarKey</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz282414</meta> + <property name="classId" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLAS_ID`"/> + </property> + <property name="groupId" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GRP_ID`"/> + </property> + </component> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz282414.impl.FooImpl" entity-name="Foo" abstract="false" lazy="false" discriminator-value="Foo" table="`FOO_TABLE`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz282414</meta> + <id name="dnmSK" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`DNM_SK`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FOO_TABLEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="bagOfBars" lazy="true" cascade="all,delete-orphan"> + <key update="true" property-ref="clientId" foreign-key="FOO_BAGOFBARS"> + <column name="`GRP_ID`" unique="false"/> + </key> + <one-to-many entity-name="Bar"/> + </bag> + <property name="clientId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLI_ID`" length="8"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz284859Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz284859Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz284859Action_hsqldb_e_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz284859Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz284859Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz284859Action_hsqldb_h_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz288963Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz288963Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6af78dd27 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz288963Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,78 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="bz288963.BooktypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</param> + <param name="edatatype">BooktypeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="citation" entity-name="Book" lazy="false" cascade="all" foreign-key="BOOK_CITATION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_CITATION_E_ID`"/> + </many-to-one> + <list name="paralist" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_PARALIST"> + <column name="`BOOK_PARALIST_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_PARALIST_IDX`"/> + <one-to-many entity-name="Paragraph"/> + </list> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="selfdef" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SELFDEF`"/> + </property> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz288963.Booktype</param> + <param name="eclassifier">Booktype</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.ParagraphImpl" entity-name="Paragraph" abstract="false" lazy="false" table="`PARAGRAPH`"> + <meta attribute="eclassName" inherit="false">Paragraph</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.FootnoteImpl" entity-name="Footnote" abstract="false" lazy="false" extends="Paragraph" table="`FOOTNOTE`"> + <meta attribute="eclassName" inherit="false">Footnote</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <key> + <column name="`PARAGRAPH_E_ID`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.IndentedparaImpl" entity-name="Indentedpara" abstract="false" lazy="false" extends="Paragraph" table="`INDENTEDPARA`"> + <meta attribute="eclassName" inherit="false">Indentedpara</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <key> + <column name="`PARAGRAPH_E_ID`"/> + </key> + <property name="indentSpace" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`INDENTSPACE`"/> + </property> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz288963Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz288963Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..ab5b19434 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz288963Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,78 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="bz288963.BooktypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</param> + <param name="edatatype">BooktypeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="citation" entity-name="Book" lazy="false" cascade="all" foreign-key="BOOK_CITATION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_CITATION_E_ID`"/> + </many-to-one> + <list name="paralist" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_PARALIST"> + <column name="`BOOK_PARALIST_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_PARALIST_IDX`"/> + <one-to-many entity-name="Paragraph"/> + </list> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="selfdef" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SELFDEF`"/> + </property> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz288963.Booktype</param> + <param name="eclassifier">Booktype</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.ParagraphImpl" entity-name="Paragraph" abstract="false" lazy="false" discriminator-value="Paragraph" table="`PARAGRAPH`"> + <meta attribute="eclassName" inherit="false">Paragraph</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARAGRAPHDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.FootnoteImpl" entity-name="Footnote" abstract="false" lazy="false" extends="Paragraph" discriminator-value="Footnote"> + <meta attribute="eclassName" inherit="false">Footnote</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz288963.impl.IndentedparaImpl" entity-name="Indentedpara" abstract="false" lazy="false" extends="Paragraph" discriminator-value="Indentedpara"> + <meta attribute="eclassName" inherit="false">Indentedpara</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz288963</meta> + <property name="indentSpace" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`INDENTSPACE`"/> + </property> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz292074Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz292074Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5b886015f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz292074Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,114 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" table="`LIBRARY`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" table="`WRITER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" table="`ONETIMEWONDER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" table="`AUTHOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz292074Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz292074Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..de131434f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz292074Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" discriminator-value="Book" table="`BOOK`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http:///org/eclipse/example/library.ecore</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" discriminator-value="Library" table="`LIBRARY`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" discriminator-value="Writer" table="`WRITER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" discriminator-value="OneTimeWonder" table="`ONETIMEWONDER`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName" inherit="false">OneTimeWonder</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONETIMEWONDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" discriminator-value="Author" table="`AUTHOR`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName" inherit="false">Author</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AUTHORDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="Name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz293848Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz293848Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..28da590fd --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz293848Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,83 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="ComType" abstract="false" lazy="true" table="`COMTYPE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">ComType</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="employees" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="COMTYPE_EMPLOYEES"> + <column name="`COMTYPE_EMPLOYEES_E_ID`" unique="false"/> + </key> + <list-index column="`COMTYPE_EMPLOYEES_IDX`"/> + <one-to-many entity-name="PersonType"/> + </list> + <many-to-one name="location" entity-name="LocationType" lazy="proxy" cascade="all" foreign-key="COMTYPE_LOCATION" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`LOCATIONTYPE_LOCATION_E_ID`"/> + </many-to-one> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class entity-name="Department" abstract="false" lazy="true" table="`DEPARTMENT`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Department</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="booktype" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BOOKTYPE`"/> + </property> + <property name="bookname" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BOOKNAME`"/> + </property> + </class> + <class entity-name="LocationType" abstract="false" lazy="true" table="`LOCATIONTYPE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">LocationType</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="zip" entity-name="Department" lazy="proxy" cascade="all" foreign-key="LOCATIONTYPE_ZIP" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`DEPARTMENT_ZIP_E_ID`"/> + </many-to-one> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> + <class entity-name="PersonType" abstract="false" lazy="true" table="`PERSONTYPE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">PersonType</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + <property name="firstName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FIRSTNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz293848Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz293848Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5be4055a1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz293848Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="ComType" abstract="false" lazy="true" discriminator-value="ComType" table="`COMTYPE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">ComType</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COMTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="employees" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="COMTYPE_EMPLOYEES"> + <column name="`COMTYPE_EMPLOYEES_E_ID`" unique="false"/> + </key> + <list-index column="`COMTYPE_EMPLOYEES_IDX`"/> + <one-to-many entity-name="PersonType"/> + </list> + <many-to-one name="location" entity-name="LocationType" lazy="proxy" cascade="all" foreign-key="COMTYPE_LOCATION" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`LOCATIONTYPE_LOCATION_E_ID`"/> + </many-to-one> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class entity-name="Department" abstract="false" lazy="true" discriminator-value="Department" table="`DEPARTMENT`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Department</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DEPARTMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="booktype" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BOOKTYPE`"/> + </property> + <property name="bookname" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BOOKNAME`"/> + </property> + </class> + <class entity-name="LocationType" abstract="false" lazy="true" discriminator-value="LocationType" table="`LOCATIONTYPE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">LocationType</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LOCATIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="zip" entity-name="Department" lazy="proxy" cascade="all" foreign-key="LOCATIONTYPE_ZIP" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`DEPARTMENT_ZIP_E_ID`"/> + </many-to-one> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> + <class entity-name="PersonType" abstract="false" lazy="true" discriminator-value="PersonType" table="`PERSONTYPE`" proxy="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">PersonType</meta> + <meta attribute="epackage" inherit="false">http://www.tech.com/tech/test/UploadNewXSDTest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + <property name="firstName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FIRSTNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz294201Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz294201Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..fda1ddca4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz294201Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,74 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="documentrootexp.DocumentRoot" abstract="false" lazy="false" table="`DOCUMENTROOTEXP_DOCUMENTROOT`"> + <meta attribute="eclassName" inherit="false">DocumentRoot</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentrootexp</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`DOCUMENTROOTEXP_DOCUMENTROOT_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DOCUMENTROOT_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`DOCUMENTROOT_MIXED_IDX`"/> + <one-to-many entity-name="DocumentRoot_mixed"/> + </list> + </class> + <class entity-name="DocumentRoot_mixed" lazy="false" table="`DOCUMENTROOT_MIXED`"> + <meta attribute="featureMap" inherit="false">documentrootexp.DocumentRoot</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <map name="xMLNSPrefixMap" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XMLNSPREFIXMAP_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="xSISchemaLocation" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XSISCHEMALOCATION_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <any id-type="long" meta-type="string" name="aNYTHING" cascade="all"> + <column not-null="false" unique="false" name="`MIXED_ANYTHING_TYPE`"/> + <column not-null="false" unique="false" name="`MIXED_ANYTHING_ID`"/> + </any> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="PersonType" abstract="false" lazy="false" table="`PERSONTYPE`"> + <meta attribute="eclassName" inherit="false">PersonType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentrootexp</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + <property name="firstName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FIRSTNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz294201Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz294201Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..fad8b0278 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz294201Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,80 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="documentrootexp.DocumentRoot" abstract="false" lazy="false" discriminator-value="documentrootexp.DocumentRoot" table="`DOCUMENTROOTEXP_DOCUMENTROOT`"> + <meta attribute="eclassName" inherit="false">DocumentRoot</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentrootexp</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DOCUMENTROOTEXP_DOCUMENTROOTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`DOCUMENTROOTEXP_DOCUMENTROOT_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DOCUMENTROOT_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`DOCUMENTROOT_MIXED_IDX`"/> + <one-to-many entity-name="DocumentRoot_mixed"/> + </list> + </class> + <class entity-name="DocumentRoot_mixed" lazy="false" table="`DOCUMENTROOT_MIXED`"> + <meta attribute="featureMap" inherit="false">documentrootexp.DocumentRoot</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <map name="xMLNSPrefixMap" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XMLNSPREFIXMAP_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="xSISchemaLocation" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XSISCHEMALOCATION_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <any id-type="long" meta-type="string" name="aNYTHING" cascade="all"> + <column not-null="false" unique="false" name="`MIXED_ANYTHING_TYPE`"/> + <column not-null="false" unique="false" name="`MIXED_ANYTHING_ID`"/> + </any> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="PersonType" abstract="false" lazy="false" discriminator-value="PersonType" table="`PERSONTYPE`"> + <meta attribute="eclassName" inherit="false">PersonType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentrootexp</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + <property name="firstName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FIRSTNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321765Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321765Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1540f4d17 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321765Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,31 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321765.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321765</meta> + <composite-id name="employeePK" class="org.eclipse.emf.teneo.samples.issues.bz321765.impl.EmployeePKImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">EmployeePK</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321765</meta> + <key-property name="id" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`ID`"/> + </key-property> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="salary" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`SALARY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321765Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321765Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cda28f298 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321765Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,34 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321765.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" discriminator-value="Employee" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321765</meta> + <composite-id name="employeePK" class="org.eclipse.emf.teneo.samples.issues.bz321765.impl.EmployeePKImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">EmployeePK</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321765</meta> + <key-property name="id" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`ID`"/> + </key-property> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMPLOYEEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="salary" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`SALARY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321768Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321768Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..25ec681da --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321768Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,26 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.issues.Bz321768Action</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <component name="name" class="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.issues.Bz321768Action</meta> + <property name="firstName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME_FIRSTNAME`"/> + </property> + <property name="lastName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME_LASTNAME`"/> + </property> + </component> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321768Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321768Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..9919e16b8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321768Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,29 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.issues.Bz321768Action</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <component name="name" class="org.eclipse.emf.ecore.impl.DynamicEObjectImpl"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage">http:///www.elver.org/org.eclipse.emf.teneo.hibernate.test.issues.Bz321768Action</meta> + <property name="firstName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME_FIRSTNAME`"/> + </property> + <property name="lastName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME_LASTNAME`"/> + </property> + </component> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_e_o_hibernate.hbm.xml index 88a48194a..d75c9dea0 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_e_o_hibernate.hbm.xml @@ -2,21 +2,21 @@ <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping auto-import="false"> - <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" table="`child`"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" table="`CHILD`"> <meta attribute="eclassName" inherit="false">Child</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321770</meta> <id name="id" type="long" unsaved-value="0"> - <column not-null="true" unique="false" name="`id`"/> + <column not-null="true" unique="false" name="`ID`"/> <generator class="native"/> </id> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`name`"/> + <column not-null="true" unique="false" name="`NAME`"/> </property> </class> - <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" table="`parent`"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" table="`PARENT`"> <meta attribute="eclassName" inherit="false">Parent</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321770</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -26,9 +26,9 @@ <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> - <bag name="child" order-by="`id` asc" lazy="true" cascade="all,delete-orphan"> - <key update="true" foreign-key="parent_child"> - <column name="`parent_child_e_id`" not-null="false" unique="false"/> + <bag name="child" order-by="`ID` asc" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PARENT_CHILD"> + <column name="`PARENT_CHILD_E_ID`" unique="false"/> </key> <one-to-many entity-name="Child"/> </bag> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_h_o_hibernate.hbm.xml index 149886370..8cd8a5cc3 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321770Action_hsqldb_h_o_hibernate.hbm.xml @@ -2,24 +2,24 @@ <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping auto-import="false"> - <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" discriminator-value="Child" table="`child`"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" discriminator-value="Child" table="`CHILD`"> <meta attribute="eclassName" inherit="false">Child</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321770</meta> <id name="id" type="long" unsaved-value="0"> - <column not-null="true" unique="false" name="`id`"/> + <column not-null="true" unique="false" name="`ID`"/> <generator class="native"/> </id> <discriminator type="string"> - <column name="dtype" index="childdtype" length="255" not-null="true"/> + <column name="`DTYPE`" index="CHILDDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`name`"/> + <column not-null="true" unique="false" name="`NAME`"/> </property> </class> - <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" discriminator-value="Parent" table="`parent`"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321770.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" discriminator-value="Parent" table="`PARENT`"> <meta attribute="eclassName" inherit="false">Parent</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321770</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -27,14 +27,14 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="dtype" index="parentdtype" length="255" not-null="true"/> + <column name="`DTYPE`" index="PARENTDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> - <bag name="child" order-by="`id` asc" lazy="true" cascade="all,delete-orphan"> - <key update="true" foreign-key="parent_child"> - <column name="`parent_child_e_id`" not-null="false" unique="false"/> + <bag name="child" order-by="`ID` asc" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PARENT_CHILD"> + <column name="`PARENT_CHILD_E_ID`" unique="false"/> </key> <one-to-many entity-name="Child"/> </bag> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321773Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321773Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3e71ffe1b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321773Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321773.impl.Item1Impl" entity-name="Item1" abstract="false" lazy="false" table="`ITEM1`"> + <meta attribute="eclassName" inherit="false">Item1</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321773</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="sequence"> + <param name="sequence">firstSeq</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="data" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DATA`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz321773.impl.Item2Impl" entity-name="Item2" abstract="false" lazy="false" table="`ITEM2`"> + <meta attribute="eclassName" inherit="false">Item2</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321773</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="seqhilo"> + <param name="sequence">secondSeq</param> + <param name="max_lo">24</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="data" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DATA`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321773Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321773Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..bd8c59684 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz321773Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,44 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz321773.impl.Item1Impl" entity-name="Item1" abstract="false" lazy="false" discriminator-value="Item1" table="`ITEM1`"> + <meta attribute="eclassName" inherit="false">Item1</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321773</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="sequence"> + <param name="sequence">firstSeq</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEM1DTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="data" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DATA`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz321773.impl.Item2Impl" entity-name="Item2" abstract="false" lazy="false" discriminator-value="Item2" table="`ITEM2`"> + <meta attribute="eclassName" inherit="false">Item2</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz321773</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="seqhilo"> + <param name="sequence">secondSeq</param> + <param name="max_lo">24</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEM2DTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="data" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DATA`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz331953Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz331953Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz331953Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz331953Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz331953Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz331953Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz336501Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz336501Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b8a539eee --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz336501Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,25 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz336501.impl.TestImpl" entity-name="Test" abstract="false" lazy="false" table="`TEST`"> + <meta attribute="eclassName" inherit="false">Test</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz336501</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="dateOrTime" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`DATEORTIME`"/> + </property> + <list name="dateOrTimes" table="`TEST_DATEORTIMES`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TEST_DATEORTIMES_NAME`" unique="false"/> + </key> + <list-index column="`TEST_DATEORTIMES_IDX`"/> + <element type="timestamp"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz336501Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz336501Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f74f365a7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz336501Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz336501.impl.TestImpl" entity-name="Test" abstract="false" lazy="false" discriminator-value="Test" table="`TEST`"> + <meta attribute="eclassName" inherit="false">Test</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz336501</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="dateOrTime" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`DATEORTIME`"/> + </property> + <list name="dateOrTimes" table="`TEST_DATEORTIMES`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TEST_DATEORTIMES_NAME`" unique="false"/> + </key> + <list-index column="`TEST_DATEORTIMES_IDX`"/> + <element type="timestamp"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz337580Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz337580Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..29393817b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz337580Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz337580.impl.TestImpl" entity-name="Test" abstract="false" lazy="false" table="`AVERYLONGNAMEFORTEST`"> + <meta attribute="eclassName" inherit="false">Test</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz337580</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="nameWhichShouldBeTrunctated" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NMWHCHSHLD`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz337580Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz337580Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..aa604d205 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz337580Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz337580.impl.TestImpl" entity-name="Test" abstract="false" lazy="false" discriminator-value="Test" table="`AVERYLONGNAMEFORTEST`"> + <meta attribute="eclassName" inherit="false">Test</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz337580</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AVERYLONGNAMEFORTESTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="nameWhichShouldBeTrunctated" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NMWHCHSHLD`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NoCollectionOwnerAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NoCollectionOwnerAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..aa506e096 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NoCollectionOwnerAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,175 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.ProductImpl" entity-name="Product" abstract="false" lazy="false" table="`PRODUCT`"> + <meta attribute="eclassName" inherit="false">Product</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Integer"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <many-to-one name="productCategory" entity-name="ProductCategory" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCT_PRODUCTCATEGORY" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`PRODUCT_PRODUCTCATEGORY_E_ID`"/> + </many-to-one> + <many-to-one name="priceCategory" entity-name="PriceCategory" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCT_PRICECATEGORY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PRICECATEGORY_PRICECATEGORY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="surname" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SURNAME`"/> + </property> + <property name="familyName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FAMILYNAME`"/> + </property> + <property name="telephoneNr" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TELEPHONENR`"/> + </property> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + <property name="hotel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`HOTEL`"/> + </property> + <list name="comments" table="`CUSTOMER_COMMENTS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CUSTOMER_COMMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`CUSTOMER_COMMENTS_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.ProductCategoryImpl" entity-name="ProductCategory" abstract="false" lazy="false" table="`PRODUCTCATEGORY`"> + <meta attribute="eclassName" inherit="false">ProductCategory</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="products" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCT_PRODUCTCATEGORY_E_ID`" unique="false"/> + </key> + <list-index column="`PRODUCTCATEGORY_PRODUCTS_IDX`"/> + <one-to-many entity-name="Product"/> + </list> + <list name="subCategorys" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTCATEGORY_PARENT_E_ID`" unique="false"/> + </key> + <list-index column="`PRODUCTCATEGORY_SUBCATEGORYS_IDX`"/> + <one-to-many entity-name="ProductCategory"/> + </list> + <many-to-one name="parent" entity-name="ProductCategory" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTCATEGORY_PARENT" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`PRODUCTCATEGORY_PARENT_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.PriceCategoryImpl" entity-name="PriceCategory" abstract="false" lazy="false" table="`PRICECATEGORY`"> + <meta attribute="eclassName" inherit="false">PriceCategory</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="prices" table="`PRICECATEGORY_PRICES`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRICECATEGORY_PRICES_NAME`" unique="false"/> + </key> + <list-index column="`PRICECATEGORY_PRICES_IDX`"/> + <element type="double"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.OrderImpl" entity-name="Order" abstract="false" lazy="false" table="`ORDER`"> + <meta attribute="eclassName" inherit="false">Order</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <list name="transactions" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TRANSACTION_ORDER_E_ID`" unique="false"/> + </key> + <list-index column="`ORDER_TRANSACTIONS_IDX`"/> + <one-to-many entity-name="Transaction"/> + </list> + <many-to-one name="customer" entity-name="Customer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ORDER_CUSTOMER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CUSTOMER_CUSTOMER_E_ID`"/> + </many-to-one> + <list name="comments" table="`ORDER_COMMENTS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ORDER_COMMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`ORDER_COMMENTS_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.TransactionImpl" entity-name="Transaction" abstract="false" lazy="false" table="`TRANSACTION`"> + <meta attribute="eclassName" inherit="false">Transaction</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <many-to-one name="order" entity-name="Order" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TRANSACTION_ORDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TRANSACTION_ORDER_E_ID`"/> + </many-to-one> + <many-to-one name="product" entity-name="Product" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TRANSACTION_PRODUCT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PRODUCT_PRODUCT_E_ID`"/> + </many-to-one> + <property name="startDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="paidDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`PAIDDATE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NoCollectionOwnerAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NoCollectionOwnerAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0c7fe4c71 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NoCollectionOwnerAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,193 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.ProductImpl" entity-name="Product" abstract="false" lazy="false" discriminator-value="Product" table="`PRODUCT`"> + <meta attribute="eclassName" inherit="false">Product</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Integer"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <many-to-one name="productCategory" entity-name="ProductCategory" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCT_PRODUCTCATEGORY" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`PRODUCT_PRODUCTCATEGORY_E_ID`"/> + </many-to-one> + <many-to-one name="priceCategory" entity-name="PriceCategory" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCT_PRICECATEGORY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PRICECATEGORY_PRICECATEGORY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" discriminator-value="Customer" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CUSTOMERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="surname" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SURNAME`"/> + </property> + <property name="familyName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FAMILYNAME`"/> + </property> + <property name="telephoneNr" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TELEPHONENR`"/> + </property> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + <property name="hotel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`HOTEL`"/> + </property> + <list name="comments" table="`CUSTOMER_COMMENTS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CUSTOMER_COMMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`CUSTOMER_COMMENTS_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.ProductCategoryImpl" entity-name="ProductCategory" abstract="false" lazy="false" discriminator-value="ProductCategory" table="`PRODUCTCATEGORY`"> + <meta attribute="eclassName" inherit="false">ProductCategory</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTCATEGORYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="products" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCT_PRODUCTCATEGORY_E_ID`" unique="false"/> + </key> + <list-index column="`PRODUCTCATEGORY_PRODUCTS_IDX`"/> + <one-to-many entity-name="Product"/> + </list> + <list name="subCategorys" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRODUCTCATEGORY_PARENT_E_ID`" unique="false"/> + </key> + <list-index column="`PRODUCTCATEGORY_SUBCATEGORYS_IDX`"/> + <one-to-many entity-name="ProductCategory"/> + </list> + <many-to-one name="parent" entity-name="ProductCategory" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTCATEGORY_PARENT" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`PRODUCTCATEGORY_PARENT_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.PriceCategoryImpl" entity-name="PriceCategory" abstract="false" lazy="false" discriminator-value="PriceCategory" table="`PRICECATEGORY`"> + <meta attribute="eclassName" inherit="false">PriceCategory</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRICECATEGORYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="prices" table="`PRICECATEGORY_PRICES`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PRICECATEGORY_PRICES_NAME`" unique="false"/> + </key> + <list-index column="`PRICECATEGORY_PRICES_IDX`"/> + <element type="double"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.OrderImpl" entity-name="Order" abstract="false" lazy="false" discriminator-value="Order" table="`ORDER`"> + <meta attribute="eclassName" inherit="false">Order</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ORDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <list name="transactions" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TRANSACTION_ORDER_E_ID`" unique="false"/> + </key> + <list-index column="`ORDER_TRANSACTIONS_IDX`"/> + <one-to-many entity-name="Transaction"/> + </list> + <many-to-one name="customer" entity-name="Customer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ORDER_CUSTOMER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CUSTOMER_CUSTOMER_E_ID`"/> + </many-to-one> + <list name="comments" table="`ORDER_COMMENTS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ORDER_COMMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`ORDER_COMMENTS_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nocollectionowner.impl.TransactionImpl" entity-name="Transaction" abstract="false" lazy="false" discriminator-value="Transaction" table="`TRANSACTION`"> + <meta attribute="eclassName" inherit="false">Transaction</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/nocollectionowner</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TRANSACTIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + <many-to-one name="order" entity-name="Order" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TRANSACTION_ORDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TRANSACTION_ORDER_E_ID`"/> + </many-to-one> + <many-to-one name="product" entity-name="Product" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TRANSACTION_PRODUCT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PRODUCT_PRODUCT_E_ID`"/> + </many-to-one> + <property name="startDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="paidDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`PAIDDATE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/TransientOtmAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/TransientOtmAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..d1cb04891 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/TransientOtmAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,36 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.transientotm.impl.TBookImpl" entity-name="TBook" abstract="false" lazy="false" table="`TBOOK`"> + <meta attribute="eclassName" inherit="false">TBook</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/hibernate/transientotm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.transientotm.impl.TWriterImpl" entity-name="TWriter" abstract="false" lazy="false" table="`TWRITER`"> + <meta attribute="eclassName" inherit="false">TWriter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/hibernate/transientotm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="book" entity-name="TBook" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWRITER_BOOK" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TBOOK_BOOK_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/TransientOtmAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/TransientOtmAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b8e06c308 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/TransientOtmAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,42 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.transientotm.impl.TBookImpl" entity-name="TBook" abstract="false" lazy="false" discriminator-value="TBook" table="`TBOOK`"> + <meta attribute="eclassName" inherit="false">TBook</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/hibernate/transientotm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TBOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.hibernate.transientotm.impl.TWriterImpl" entity-name="TWriter" abstract="false" lazy="false" discriminator-value="TWriter" table="`TWRITER`"> + <meta attribute="eclassName" inherit="false">TWriter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/hibernate/transientotm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TWRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="book" entity-name="TBook" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWRITER_BOOK" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TBOOK_BOOK_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/UpdateAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/UpdateAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4cde5d957 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/UpdateAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,32 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.update.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/update</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.update.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/update</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="children" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`PARENT_CHILDREN_NAME`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/UpdateAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/UpdateAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..2c0972c42 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/UpdateAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.update.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" discriminator-value="Child" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/update</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CHILDDTYPE" length="255" not-null="true"/> + </discriminator> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.update.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" discriminator-value="Parent" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/update</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTDTYPE" length="255" not-null="true"/> + </discriminator> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="children" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`PARENT_CHILDREN_NAME`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2afd83c24 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,60 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id type="long" name="myid" column="myid" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="postalCode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTALCODE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`EMPLOYEE_ADDRESS_ID`"/> + </many-to-one> + <property name="department" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DEPARTMENT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.StudentImpl" entity-name="Student" abstract="false" lazy="false" table="`STUDENT`"> + <meta attribute="eclassName" inherit="false">Student</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <property name="faculty" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FACULTY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c6397590f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,69 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id type="long" name="myid" column="myid" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="postalCode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTALCODE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" discriminator-value="Employee" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMPLOYEEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`EMPLOYEE_ADDRESS_ID`"/> + </many-to-one> + <property name="department" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DEPARTMENT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.StudentImpl" entity-name="Student" abstract="false" lazy="false" discriminator-value="Student" table="`STUDENT`"> + <meta attribute="eclassName" inherit="false">Student</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STUDENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <property name="faculty" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FACULTY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..c6397590f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AssociationOverrideAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,69 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id type="long" name="myid" column="myid" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="postalCode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTALCODE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" discriminator-value="Employee" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMPLOYEEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`EMPLOYEE_ADDRESS_ID`"/> + </many-to-one> + <property name="department" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DEPARTMENT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.associationoverride.impl.StudentImpl" entity-name="Student" abstract="false" lazy="false" discriminator-value="Student" table="`STUDENT`"> + <meta attribute="eclassName" inherit="false">Student</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/associationoverride</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STUDENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <property name="faculty" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FACULTY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AttributeOverridesAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AttributeOverridesAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..d026d7a14 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AttributeOverridesAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,39 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.attributeoverrides.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/emf/teneo/samples/emf/annotations/attributeoverrides.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <component name="bornIn" class="org.eclipse.emf.teneo.samples.emf.annotations.attributeoverrides.impl.CityImpl"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage">http:///org/eclipse/emf/teneo/samples/emf/annotations/attributeoverrides.ecore</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BORNNAMECOLUMN`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BORNIN_COUNTRY`"/> + </property> + </component> + <component name="livesIn" class="org.eclipse.emf.teneo.samples.emf.annotations.attributeoverrides.impl.CityImpl"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage">http:///org/eclipse/emf/teneo/samples/emf/annotations/attributeoverrides.ecore</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAMECOLUMN`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRYCOLUMN`"/> + </property> + </component> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AttributeOverridesAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AttributeOverridesAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..4bbf13c36 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/AttributeOverridesAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,42 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.attributeoverrides.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///org/eclipse/emf/teneo/samples/emf/annotations/attributeoverrides.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <component name="bornIn" class="org.eclipse.emf.teneo.samples.emf.annotations.attributeoverrides.impl.CityImpl"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage">http:///org/eclipse/emf/teneo/samples/emf/annotations/attributeoverrides.ecore</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BORNNAMECOLUMN`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BORNIN_COUNTRY`"/> + </property> + </component> + <component name="livesIn" class="org.eclipse.emf.teneo.samples.emf.annotations.attributeoverrides.impl.CityImpl"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage">http:///org/eclipse/emf/teneo/samples/emf/annotations/attributeoverrides.ecore</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAMECOLUMN`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRYCOLUMN`"/> + </property> + </component> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BasicAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BasicAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5eaf47e02 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BasicAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.basic.impl.BasicImpl" entity-name="Basic" abstract="false" lazy="false" table="`BASIC`"> + <meta attribute="eclassName" inherit="false">Basic</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/basic</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="myVersion" type="long"> + <column not-null="true" unique="false" name="`MYVERSION`"/> + </version> + <property name="myOptionalBasic" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYOPTIONALBASIC`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BasicAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BasicAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..1eb119edc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BasicAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.basic.impl.BasicImpl" entity-name="Basic" abstract="false" lazy="false" discriminator-value="Basic" table="`BASIC`"> + <meta attribute="eclassName" inherit="false">Basic</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/basic</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BASICDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="myVersion" type="long"> + <column not-null="true" unique="false" name="`MYVERSION`"/> + </version> + <property name="myOptionalBasic" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYOPTIONALBASIC`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BookAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BookAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e95455d06 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BookAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.column.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`MYBOOKTABLE`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/column</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`TITEL`" length="25"/> + </property> + <property name="pages" lazy="false" insert="false" update="false" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="weight" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`GEWICHT`" precision="5" scale="2"/> + </property> + <property name="author" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AUTHOR`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BookAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BookAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..54e2de2c0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/BookAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,31 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.column.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`MYBOOKTABLE`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/column</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="mybooktableDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`TITEL`" length="25"/> + </property> + <property name="pages" lazy="false" insert="false" update="false" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="weight" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`GEWICHT`" precision="5" scale="2"/> + </property> + <property name="author" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AUTHOR`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6b2b60484 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,86 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="cascadenotall.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="merge,persist,save-update,lock,refresh,delete"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock,refresh,delete"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..dba66af3c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="cascadenotall.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="merge,persist,save-update,lock,refresh,delete"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock,refresh,delete"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..dba66af3c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CascadeNotallAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="cascadenotall.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="true" cascade="merge,persist,save-update,lock,refresh,delete"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock,refresh,delete"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.cascadenotall.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/cascadenotall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CompositeIdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CompositeIdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..9cdd4ae65 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CompositeIdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,44 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/samples/emf/annotations/compositeid.ecore</meta> + <composite-id class="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID" mapped="true"> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" extends="Person" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/samples/emf/annotations/compositeid.ecore</meta> + <key> + <column name="`PERSON_FIRSTNAME`"/> + <column name="`PERSON_LASTNAME`"/> + </key> + <list name="children" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`MYPARENTFIRSTNAME`" unique="false"/> + <column name="`MYPARENTLASTNAME`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Person" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/samples/emf/annotations/compositeid.ecore</meta> + <key> + <column name="`PERSON_FIRSTNAME`"/> + <column name="`PERSON_LASTNAME`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CompositeIdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CompositeIdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..94289193d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/CompositeIdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,39 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/samples/emf/annotations/compositeid.ecore</meta> + <composite-id class="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID" mapped="true"> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" extends="Person" discriminator-value="Parent"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/samples/emf/annotations/compositeid.ecore</meta> + <list name="children" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`MYPARENTFIRSTNAME`" unique="false"/> + <column name="`MYPARENTLASTNAME`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Person" discriminator-value="Child"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/samples/emf/annotations/compositeid.ecore</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/DuplicatesAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/DuplicatesAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..49f34b2ed --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/DuplicatesAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,40 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.duplicates.impl.ChildItemImpl" entity-name="ChildItem" abstract="false" lazy="false" table="`CHILDITEM`"> + <meta attribute="eclassName" inherit="false">ChildItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/duplicates</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.duplicates.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/duplicates</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="childItem" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ITEM_CHILDITEM"> + <column name="`ITEM_CHILDITEM_E_ID`" unique="false"/> + </key> + <list-index column="`ITEM_CHILDITEM_IDX`"/> + <one-to-many entity-name="ChildItem"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/DuplicatesAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/DuplicatesAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..712ba99b7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/DuplicatesAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.duplicates.impl.ChildItemImpl" entity-name="ChildItem" abstract="false" lazy="false" discriminator-value="ChildItem" table="`CHILDITEM`"> + <meta attribute="eclassName" inherit="false">ChildItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/duplicates</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CHILDITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.duplicates.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/duplicates</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="childItem" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ITEM_CHILDITEM"> + <column name="`ITEM_CHILDITEM_E_ID`" unique="false"/> + </key> + <list-index column="`ITEM_CHILDITEM_IDX`"/> + <one-to-many entity-name="ChildItem"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7a03b2bad --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.edatatypeColumn.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`MYBOOKTABLE`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/edatatype_column</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`TITEL`" length="25"/> + </property> + <property name="pages" lazy="false" insert="false" update="false" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="weight" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`GEWICHT`" precision="5" scale="2"/> + </property> + <property name="author" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AUTHOR`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..26fe89aaf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,31 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.edatatypeColumn.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`MYBOOKTABLE`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/edatatype_column</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="mybooktableDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`TITEL`" length="25"/> + </property> + <property name="pages" lazy="false" insert="false" update="false" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="weight" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`GEWICHT`" precision="5" scale="2"/> + </property> + <property name="author" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AUTHOR`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..26fe89aaf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EDataTypeAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,31 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.edatatypeColumn.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`MYBOOKTABLE`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/edatatype_column</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="mybooktableDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`TITEL`" length="25"/> + </property> + <property name="pages" lazy="false" insert="false" update="false" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="weight" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`GEWICHT`" precision="5" scale="2"/> + </property> + <property name="author" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AUTHOR`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..724edc3ea --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,105 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbedderImpl" entity-name="Embedder" abstract="false" lazy="false" table="`EMBEDDER`"> + <meta attribute="eclassName" inherit="false">Embedder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <component name="firstEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLUMNSTRING3`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`FIRSTEMBEDDED_MYINTEGER`"/> + </property> + </component> + <component name="secondEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLUMNSTRING1`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COLUMNINTEGER1`"/> + </property> + </component> + <component name="thirdEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLUMNSTRING2`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COLUMNINTEGER2`"/> + </property> + </component> + <list name="fourthEmbedded" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`EMBEDDER_FOURTHEMBEDDED_E_ID`" unique="false"/> + </key> + <list-index column="`EMBEDDER_FOURTHEMBEDDED_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYSTRING`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MYINTEGER`"/> + </property> + </composite-element> + </list> + <component name="fifthEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIFTHEMBEDDED_MYSTRING`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`FIFTHEMBEDDED_MYINTEGER`"/> + </property> + </component> + <component name="alsoEmbeddable" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.AlsoEmbeddableImpl"> + <meta attribute="eclassName" inherit="false">AlsoEmbeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALSOEMBEDDABLE_NAME`"/> + </property> + </component> + <component name="anotherEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.AnotherEmbeddableImpl"> + <meta attribute="eclassName" inherit="false">AnotherEmbeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="anotherName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ANOTHEREMBEDDED_ANOTHERNAME`"/> + </property> + <list name="aOneToMany" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ANOTHEREMBEDDABLE_AONETOMANY_E_ID`" unique="false"/> + </key> + <list-index column="`ANOTHEREMBEDDABLE_AONETOMANY_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.AOneToManyImpl"> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ANOTHEREMBEDDED_NAME`"/> + </property> + </composite-element> + </list> + <component name="nestedEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.NestedEmbeddableImpl"> + <meta attribute="eclassName" inherit="false">NestedEmbeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="nestedName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NE_NESTEDNAME`"/> + </property> + </component> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ANOTHEREMBEDDED_NAME`"/> + </property> + </component> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..d0056d104 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,108 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbedderImpl" entity-name="Embedder" abstract="false" lazy="false" discriminator-value="Embedder" table="`EMBEDDER`"> + <meta attribute="eclassName" inherit="false">Embedder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMBEDDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <component name="firstEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLUMNSTRING3`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`FIRSTEMBEDDED_MYINTEGER`"/> + </property> + </component> + <component name="secondEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLUMNSTRING1`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COLUMNINTEGER1`"/> + </property> + </component> + <component name="thirdEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLUMNSTRING2`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`COLUMNINTEGER2`"/> + </property> + </component> + <list name="fourthEmbedded" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`EMBEDDER_FOURTHEMBEDDED_E_ID`" unique="false"/> + </key> + <list-index column="`EMBEDDER_FOURTHEMBEDDED_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYSTRING`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MYINTEGER`"/> + </property> + </composite-element> + </list> + <component name="fifthEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.EmbeddableImpl"> + <meta attribute="eclassName" inherit="false">Embeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="myString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIFTHEMBEDDED_MYSTRING`"/> + </property> + <property name="myInteger" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`FIFTHEMBEDDED_MYINTEGER`"/> + </property> + </component> + <component name="alsoEmbeddable" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.AlsoEmbeddableImpl"> + <meta attribute="eclassName" inherit="false">AlsoEmbeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ALSOEMBEDDABLE_NAME`"/> + </property> + </component> + <component name="anotherEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.AnotherEmbeddableImpl"> + <meta attribute="eclassName" inherit="false">AnotherEmbeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="anotherName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ANOTHEREMBEDDED_ANOTHERNAME`"/> + </property> + <list name="aOneToMany" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ANOTHEREMBEDDABLE_AONETOMANY_E_ID`" unique="false"/> + </key> + <list-index column="`ANOTHEREMBEDDABLE_AONETOMANY_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.AOneToManyImpl"> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ANOTHEREMBEDDED_NAME`"/> + </property> + </composite-element> + </list> + <component name="nestedEmbedded" class="org.eclipse.emf.teneo.samples.emf.annotations.embedded.impl.NestedEmbeddableImpl"> + <meta attribute="eclassName" inherit="false">NestedEmbeddable</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embedded</meta> + <property name="nestedName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NE_NESTEDNAME`"/> + </property> + </component> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`ANOTHEREMBEDDED_NAME`"/> + </property> + </component> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..5721d33f0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,25 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.NameImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b133469bf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.NameImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..b133469bf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EmbeddedIdAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <composite-id name="name" class="org.eclipse.emf.teneo.samples.emf.annotations.embeddedid.impl.NameImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">Name</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/embeddedid</meta> + <key-property name="firstName" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </key-property> + <key-property name="lastName" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EntityAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EntityAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..43222e765 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EntityAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,33 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.entity.impl.BookImpl" entity-name="Boek" abstract="false" lazy="false" table="`BOEK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/entity</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.entity.impl.WriterImpl" entity-name="Schrijver" abstract="false" lazy="false" table="`SCHRIJVER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/entity</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EntityAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EntityAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..2b4082d34 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/EntityAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,39 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.entity.impl.BookImpl" entity-name="Boek" abstract="false" lazy="false" discriminator-value="Boek" table="`BOEK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/entity</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOEKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.entity.impl.WriterImpl" entity-name="Schrijver" abstract="false" lazy="false" discriminator-value="Schrijver" table="`SCHRIJVER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/entity</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SCHRIJVERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ExternalAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ExternalAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..95790c618 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ExternalAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,45 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.external.impl.ExternalTestImpl" entity-name="ExternalTest" abstract="false" lazy="false" table="`EXTERNALTEST`"> + <meta attribute="eclassName" inherit="false">ExternalTest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/external</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="eObject" lazy="false" insert="true" update="true" not-null="false" unique="false"> + <column not-null="false" unique="false" name="`EOBJECT`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ExternalType"> + <param name="eclassName">EObject</param> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + </type> + </property> + <list name="eObjects" table="`EXTERNALTEST_EOBJECTS`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`EXTERNALTEST_E_ID`" unique="false"/> + </key> + <list-index column="`EXTERNALTEST_EOBJECTS_IDX`"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ExternalType"> + <param name="eclassName">EObject</param> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + </type> + </element> + </list> + <property name="eClass" lazy="false" insert="true" update="true" not-null="false" unique="false"> + <column not-null="false" unique="false" name="`ECLASS`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.EcoreModelElementType"> + <param name="eclassName">EClass</param> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + </type> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ExternalAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ExternalAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0abaa8aed --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ExternalAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,48 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.external.impl.ExternalTestImpl" entity-name="ExternalTest" abstract="false" lazy="false" discriminator-value="ExternalTest" table="`EXTERNALTEST`"> + <meta attribute="eclassName" inherit="false">ExternalTest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/external</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EXTERNALTESTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="eObject" lazy="false" insert="true" update="true" not-null="false" unique="false"> + <column not-null="false" unique="false" name="`EOBJECT`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ExternalType"> + <param name="eclassName">EObject</param> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + </type> + </property> + <list name="eObjects" table="`EXTERNALTEST_EOBJECTS`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`EXTERNALTEST_E_ID`" unique="false"/> + </key> + <list-index column="`EXTERNALTEST_EOBJECTS_IDX`"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ExternalType"> + <param name="eclassName">EObject</param> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + </type> + </element> + </list> + <property name="eClass" lazy="false" insert="true" update="true" not-null="false" unique="false"> + <column not-null="false" unique="false" name="`ECLASS`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.EcoreModelElementType"> + <param name="eclassName">EClass</param> + <param name="epackage">http://www.eclipse.org/emf/2002/Ecore</param> + </type> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ForcedIdBagAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ForcedIdBagAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..16f7f6bf0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ForcedIdBagAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,55 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.forcedidbag.impl.RoleImpl" entity-name="Role" abstract="false" lazy="false" table="`ROLE`"> + <meta attribute="eclassName" inherit="false">Role</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/Forcedidbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="users" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`ROLE_USER`"> + <collection-id column="idbag_id" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`ROLE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="User" unique="false" foreign-key="ROLE_USERS"> + <column name="`USER_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </idbag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.forcedidbag.impl.UserImpl" entity-name="User" abstract="false" lazy="false" table="`USER`"> + <meta attribute="eclassName" inherit="false">User</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/Forcedidbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="roles" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MYJOIN`"> + <collection-id column="idbag_id" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`USER_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Role" unique="false" foreign-key="USER_ROLES"> + <column name="`ROLE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </idbag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ForcedIdBagAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ForcedIdBagAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..8f32fe319 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ForcedIdBagAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,61 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.forcedidbag.impl.RoleImpl" entity-name="Role" abstract="false" lazy="false" discriminator-value="Role" table="`ROLE`"> + <meta attribute="eclassName" inherit="false">Role</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/Forcedidbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ROLEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="users" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`ROLE_USER`"> + <collection-id column="idbag_id" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`ROLE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="User" unique="false" foreign-key="ROLE_USERS"> + <column name="`USER_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </idbag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.forcedidbag.impl.UserImpl" entity-name="User" abstract="false" lazy="false" discriminator-value="User" table="`USER`"> + <meta attribute="eclassName" inherit="false">User</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/Forcedidbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="USERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="roles" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MYJOIN`"> + <collection-id column="idbag_id" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`USER_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Role" unique="false" foreign-key="USER_ROLES"> + <column name="`ROLE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </idbag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e2f89b704 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,68 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hbmapkeys.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeys</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writersByName" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERSBYNAME"> + <column name="`JOIN_COLUMN_WRITER`" unique="false"/> + </key> + <map-key type="java.lang.String"> + <column not-null="false" unique="false" name="`THENAMEOFTHEWRITER`"/> + </map-key> + <one-to-many entity-name="Writer"/> + </map> + <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`JOIN_COLUMN_CITY`" unique="false"/> + </key> + <map-key-many-to-many entity-name="Writer"> + <column not-null="true" unique="false" name="`THE_CITYWRITER_ID`"/> + </map-key-many-to-many> + <one-to-many entity-name="City"/> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hbmapkeys.impl.CityImpl" entity-name="City" abstract="false" lazy="false" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeys</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="cityWriter" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CITY_CITYWRITER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`THE_CITYWRITER_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hbmapkeys.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeys</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`THENAMEOFTHEWRITER`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c1371d17f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,77 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hbmapkeys.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeys</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writersByName" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERSBYNAME"> + <column name="`JOIN_COLUMN_WRITER`" unique="false"/> + </key> + <map-key type="java.lang.String"> + <column not-null="false" unique="false" name="`THENAMEOFTHEWRITER`"/> + </map-key> + <one-to-many entity-name="Writer"/> + </map> + <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`JOIN_COLUMN_CITY`" unique="false"/> + </key> + <map-key-many-to-many entity-name="Writer"> + <column not-null="true" unique="false" name="`THE_CITYWRITER_ID`"/> + </map-key-many-to-many> + <one-to-many entity-name="City"/> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hbmapkeys.impl.CityImpl" entity-name="City" abstract="false" lazy="false" discriminator-value="City" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeys</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="cityWriter" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CITY_CITYWRITER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`THE_CITYWRITER_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.hbmapkeys.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeys</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`THENAMEOFTHEWRITER`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7bd9f019d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.IdentityIDImpl" entity-name="IdentityID" abstract="false" lazy="false" table="`IDENTITYID`"> + <meta attribute="eclassName" inherit="false">IdentityID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="identity"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.SimpleIDImpl" entity-name="SimpleID" abstract="false" lazy="false" table="`SIMPLEID`"> + <meta attribute="eclassName" inherit="false">SimpleID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOD`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.TableIDImpl" entity-name="TableID" abstract="false" lazy="false" table="`TABLEID`"> + <meta attribute="eclassName" inherit="false">TableID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">uid_table</param> + <param name="column">next_hi_value_column</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.TableGeneratorIDImpl" entity-name="TableGeneratorID" abstract="false" lazy="false" table="`TABLEGENERATORID`"> + <meta attribute="eclassName" inherit="false">TableGeneratorID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">TGEN</param> + <param name="column">VAL_COL</param> + <param name="max_lo">49</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.AutoIDImpl" entity-name="AutoID" abstract="false" lazy="false" table="`AUTOID`"> + <meta attribute="eclassName" inherit="false">AutoID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.OtherTableGeneratorIDImpl" entity-name="OtherTableGeneratorID" abstract="false" lazy="false" table="`OTHERTABLEGENERATORID`"> + <meta attribute="eclassName" inherit="false">OtherTableGeneratorID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">OTHERTGEN</param> + <param name="column">VAL_COL</param> + <param name="max_lo">49</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5b6b0c613 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,103 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.IdentityIDImpl" entity-name="IdentityID" abstract="false" lazy="false" discriminator-value="IdentityID" table="`IDENTITYID`"> + <meta attribute="eclassName" inherit="false">IdentityID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="identity"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="IDENTITYIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.SimpleIDImpl" entity-name="SimpleID" abstract="false" lazy="false" discriminator-value="SimpleID" table="`SIMPLEID`"> + <meta attribute="eclassName" inherit="false">SimpleID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOD`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLEIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.TableIDImpl" entity-name="TableID" abstract="false" lazy="false" discriminator-value="TableID" table="`TABLEID`"> + <meta attribute="eclassName" inherit="false">TableID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">uid_table</param> + <param name="column">next_hi_value_column</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TABLEIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.TableGeneratorIDImpl" entity-name="TableGeneratorID" abstract="false" lazy="false" discriminator-value="TableGeneratorID" table="`TABLEGENERATORID`"> + <meta attribute="eclassName" inherit="false">TableGeneratorID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">TGEN</param> + <param name="column">VAL_COL</param> + <param name="max_lo">49</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TABLEGENERATORIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.AutoIDImpl" entity-name="AutoID" abstract="false" lazy="false" discriminator-value="AutoID" table="`AUTOID`"> + <meta attribute="eclassName" inherit="false">AutoID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="autoID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`AUTOID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AUTOIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.id.impl.OtherTableGeneratorIDImpl" entity-name="OtherTableGeneratorID" abstract="false" lazy="false" discriminator-value="OtherTableGeneratorID" table="`OTHERTABLEGENERATORID`"> + <meta attribute="eclassName" inherit="false">OtherTableGeneratorID</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/id</meta> + <id name="myid" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + <generator class="hilo"> + <param name="table">OTHERTGEN</param> + <param name="column">VAL_COL</param> + <param name="max_lo">49</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="OTHERTABLEGENERATORIDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..d0724d355 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,51 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.idbag.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/idbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.idbag.impl.UserImpl" entity-name="User" abstract="false" lazy="false" table="`USER`"> + <meta attribute="eclassName" inherit="false">User</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/idbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="roles" table="`USER_ROLES`" lazy="true" cascade="all,delete-orphan"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`USER_ROLES_E_ID`" unique="false"/> + </key> + <element type="java.lang.String"/> + </idbag> + <idbag name="addresses" lazy="true" cascade="all,delete-orphan"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true" foreign-key="USER_ADDRESSES"> + <column name="`USER_ADDRESSES_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Address"/> + </idbag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cb59097bc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,57 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.idbag.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/idbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.idbag.impl.UserImpl" entity-name="User" abstract="false" lazy="false" discriminator-value="User" table="`USER`"> + <meta attribute="eclassName" inherit="false">User</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/idbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="USERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="roles" table="`USER_ROLES`" lazy="true" cascade="all,delete-orphan"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`USER_ROLES_E_ID`" unique="false"/> + </key> + <element type="java.lang.String"/> + </idbag> + <idbag name="addresses" lazy="true" cascade="all,delete-orphan"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true" foreign-key="USER_ADDRESSES"> + <column name="`USER_ADDRESSES_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Address"/> + </idbag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..93e1117cc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IdBagAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,55 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.idbag.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/idbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.idbag.impl.UserImpl" entity-name="User" abstract="false" lazy="false" discriminator-value="User" table="`USER`"> + <meta attribute="eclassName" inherit="false">User</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/idbag</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="USERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <idbag name="roles" table="`USER_ROLES`" lazy="true" cascade="all,delete-orphan"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`USER_ROLES_E_ID`" unique="false"/> + </key> + <element type="java.lang.String"/> + </idbag> + <list name="addresses" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="USER_ADDRESSES"> + <column name="`USER_ADDRESSES_E_ID`" unique="false"/> + </key> + <list-index column="`USER_ADDRESSES_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..334b7df3b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,177 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="inheritancemapping.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="discrIndex,ohterindex" length="120"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <union-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" table="`SPECIFICCUSTOMER`"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </union-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentTwoImpl" entity-name="ParentTwo" abstract="false" lazy="false" table="`PARENTTWO`"> + <meta attribute="eclassName" inherit="false">ParentTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ChildOneImpl" entity-name="ChildOne" abstract="false" lazy="false" extends="ParentOne" table="`CHILDONE`"> + <meta attribute="eclassName" inherit="false">ChildOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`PARENTONE_E_ID`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..be1a80f62 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,186 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="inheritancemapping.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" discriminator-value="ContentList" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTENTLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="discrIndex,ohterindex" length="120"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <union-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" table="`SPECIFICCUSTOMER`"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </union-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" discriminator-value="UKAddressList" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="UKADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" discriminator-value="ParentOne" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentTwoImpl" entity-name="ParentTwo" abstract="false" lazy="false" discriminator-value="ParentTwo" table="`PARENTTWO`"> + <meta attribute="eclassName" inherit="false">ParentTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTTWODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ChildOneImpl" entity-name="ChildOne" abstract="false" lazy="false" extends="ParentOne" discriminator-value="ChildOne"> + <meta attribute="eclassName" inherit="false">ChildOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..b58f439ed --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,197 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="inheritancemapping.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" discriminator-value="ContentList" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTENTLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="mypriceDISCRIMINATOR" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" discriminator-value="Customer" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CUSTOMERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" discriminator-value="SpecificCustomer"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" discriminator-value="UKAddressList" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="UKADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" discriminator-value="ParentOne" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentTwoImpl" entity-name="ParentTwo" abstract="false" lazy="false" discriminator-value="ParentTwo" table="`PARENTTWO`"> + <meta attribute="eclassName" inherit="false">ParentTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTTWODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ChildOneImpl" entity-name="ChildOne" abstract="false" lazy="false" extends="ParentTwo" discriminator-value="ChildOne"> + <meta attribute="eclassName" inherit="false">ChildOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..334b7df3b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,177 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="inheritancemapping.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="discrIndex,ohterindex" length="120"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <union-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" table="`SPECIFICCUSTOMER`"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </union-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentTwoImpl" entity-name="ParentTwo" abstract="false" lazy="false" table="`PARENTTWO`"> + <meta attribute="eclassName" inherit="false">ParentTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ChildOneImpl" entity-name="ChildOne" abstract="false" lazy="false" extends="ParentOne" table="`CHILDONE`"> + <meta attribute="eclassName" inherit="false">ChildOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`PARENTONE_E_ID`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..be1a80f62 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,186 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="inheritancemapping.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" discriminator-value="ContentList" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTENTLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="discrIndex,ohterindex" length="120"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <union-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" table="`SPECIFICCUSTOMER`"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </union-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" discriminator-value="UKAddressList" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="UKADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" discriminator-value="ParentOne" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentTwoImpl" entity-name="ParentTwo" abstract="false" lazy="false" discriminator-value="ParentTwo" table="`PARENTTWO`"> + <meta attribute="eclassName" inherit="false">ParentTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTTWODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ChildOneImpl" entity-name="ChildOne" abstract="false" lazy="false" extends="ParentOne" discriminator-value="ChildOne"> + <meta attribute="eclassName" inherit="false">ChildOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..183da898b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/InheritanceAnnotationTablePerClassAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,190 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="inheritancemapping.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" discriminator-value="ContentList" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTENTLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <union-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" table="`INTERNATIONALPRICE`"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CURRENCY`"/> + </property> + </union-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" discriminator-value="Customer" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CUSTOMERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" discriminator-value="SpecificCustomer"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" discriminator-value="UKAddressList" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="UKADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" discriminator-value="ParentOne" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ParentTwoImpl" entity-name="ParentTwo" abstract="false" lazy="false" discriminator-value="ParentTwo" table="`PARENTTWO`"> + <meta attribute="eclassName" inherit="false">ParentTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTTWODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl.ChildOneImpl" entity-name="ChildOne" abstract="false" lazy="false" extends="ParentOne" discriminator-value="ChildOne"> + <meta attribute="eclassName" inherit="false">ChildOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IntegerDiscriminatorAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IntegerDiscriminatorAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..61f24b87b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IntegerDiscriminatorAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,53 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SuperImpl" entity-name="Super" abstract="false" lazy="false" discriminator-value="80248667" table="`SUPER_TABLE`"> + <meta attribute="eclassName" inherit="false">Super</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="integer"> + <column name="`DISC`" index="SUPER_TABLEDISC" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SubImpl" entity-name="Sub" abstract="false" lazy="false" extends="Super" discriminator-value="83488"> + <meta attribute="eclassName" inherit="false">Sub</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.OtherSubImpl" entity-name="OtherSub" abstract="false" lazy="false" extends="Super" discriminator-value="500"> + <meta attribute="eclassName" inherit="false">OtherSub</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> + <subclass entity-name="AbstractSub" abstract="true" lazy="false" extends="Super" discriminator-value="950694558"> + <meta attribute="eclassName" inherit="false">AbstractSub</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SuperFormulaImpl" entity-name="SuperFormula" abstract="false" lazy="false" discriminator-value="1" table="`SUPERFORMULA`"> + <meta attribute="eclassName" inherit="false">SuperFormula</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator formula="case when name like 'R%' then 0 when name like 'G%' then 1 else 2 end"/> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SubFormulaImpl" entity-name="SubFormula" abstract="false" lazy="false" extends="SuperFormula" discriminator-value="0"> + <meta attribute="eclassName" inherit="false">SubFormula</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IntegerDiscriminatorAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IntegerDiscriminatorAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..61f24b87b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/IntegerDiscriminatorAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,53 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SuperImpl" entity-name="Super" abstract="false" lazy="false" discriminator-value="80248667" table="`SUPER_TABLE`"> + <meta attribute="eclassName" inherit="false">Super</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="integer"> + <column name="`DISC`" index="SUPER_TABLEDISC" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SubImpl" entity-name="Sub" abstract="false" lazy="false" extends="Super" discriminator-value="83488"> + <meta attribute="eclassName" inherit="false">Sub</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.OtherSubImpl" entity-name="OtherSub" abstract="false" lazy="false" extends="Super" discriminator-value="500"> + <meta attribute="eclassName" inherit="false">OtherSub</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> + <subclass entity-name="AbstractSub" abstract="true" lazy="false" extends="Super" discriminator-value="950694558"> + <meta attribute="eclassName" inherit="false">AbstractSub</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SuperFormulaImpl" entity-name="SuperFormula" abstract="false" lazy="false" discriminator-value="1" table="`SUPERFORMULA`"> + <meta attribute="eclassName" inherit="false">SuperFormula</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator formula="case when name like 'R%' then 0 when name like 'G%' then 1 else 2 end"/> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.integerdiscriminator.impl.SubFormulaImpl" entity-name="SubFormula" abstract="false" lazy="false" extends="SuperFormula" discriminator-value="0"> + <meta attribute="eclassName" inherit="false">SubFormula</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/integerdiscriminator</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LazyLibraryAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LazyLibraryAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..68f920a99 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LazyLibraryAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,86 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="lazy.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lazy.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.lazy.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lazy.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lazy.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LazyLibraryAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LazyLibraryAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..172782afc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LazyLibraryAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="lazy.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lazy.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.annotations.lazy.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lazy.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_WRITERS"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lazy.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lazy</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..55268e0be --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,24 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lob.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lob</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..2e1828517 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,27 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lob.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lob</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..49bca7285 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/LobAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,31 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.lob.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/lob</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ManyToManyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ManyToManyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7bb4a0adf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ManyToManyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,72 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.manytomany.impl.CntrImpl" entity-name="Cntr" abstract="false" lazy="false" table="`CNTR`"> + <meta attribute="eclassName" inherit="false">Cntr</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/manytomany</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="rght" lazy="false" cascade="merge,persist,save-update,lock" table="`RIGHTCENTER`"> + <key update="true"> + <column name="`CNTR_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Rght" unique="false" foreign-key="CNTR_RGHT"> + <column name="`RGHT_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <list name="lft" lazy="false" cascade="merge,persist,save-update,lock" table="`CNTR_LFT`"> + <key update="true"> + <column name="`CNTR_E_ID`" unique="false"/> + </key> + <list-index column="`CNTR_LFT_IDX`"/> + <many-to-many entity-name="Lft" unique="false" foreign-key="CNTR_LFT"> + <column name="`LFT_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.manytomany.impl.LftImpl" entity-name="Lft" abstract="false" lazy="false" table="`LFT`"> + <meta attribute="eclassName" inherit="false">Lft</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/manytomany</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="cntr" lazy="true" cascade="merge,persist,save-update,lock" table="`LFT_CNTR`"> + <key update="true"> + <column name="`LFT_E_ID`" unique="false"/> + </key> + <list-index column="`LFT_CNTR_IDX`"/> + <many-to-many entity-name="Cntr" unique="false" foreign-key="LFT_CNTR"> + <column name="`CNTR_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.manytomany.impl.RghtImpl" entity-name="Rght" abstract="false" lazy="false" table="`RGHT`"> + <meta attribute="eclassName" inherit="false">Rght</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/manytomany</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="cntr" lazy="true" cascade="merge,persist,save-update,lock" inverse="true" table="`RIGHTCENTER`"> + <key update="true"> + <column name="`RGHT_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Cntr" unique="false" foreign-key="RGHT_CNTR"> + <column name="`CNTR_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ManyToManyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ManyToManyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6f9caf000 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ManyToManyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,81 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.manytomany.impl.CntrImpl" entity-name="Cntr" abstract="false" lazy="false" discriminator-value="Cntr" table="`CNTR`"> + <meta attribute="eclassName" inherit="false">Cntr</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/manytomany</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CNTRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="rght" lazy="false" cascade="merge,persist,save-update,lock" table="`RIGHTCENTER`"> + <key update="true"> + <column name="`CNTR_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Rght" unique="false" foreign-key="CNTR_RGHT"> + <column name="`RGHT_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <list name="lft" lazy="false" cascade="merge,persist,save-update,lock" table="`CNTR_LFT`"> + <key update="true"> + <column name="`CNTR_E_ID`" unique="false"/> + </key> + <list-index column="`CNTR_LFT_IDX`"/> + <many-to-many entity-name="Lft" unique="false" foreign-key="CNTR_LFT"> + <column name="`LFT_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.manytomany.impl.LftImpl" entity-name="Lft" abstract="false" lazy="false" discriminator-value="Lft" table="`LFT`"> + <meta attribute="eclassName" inherit="false">Lft</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/manytomany</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LFTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="cntr" lazy="true" cascade="merge,persist,save-update,lock" table="`LFT_CNTR`"> + <key update="true"> + <column name="`LFT_E_ID`" unique="false"/> + </key> + <list-index column="`LFT_CNTR_IDX`"/> + <many-to-many entity-name="Cntr" unique="false" foreign-key="LFT_CNTR"> + <column name="`CNTR_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.manytomany.impl.RghtImpl" entity-name="Rght" abstract="false" lazy="false" discriminator-value="Rght" table="`RGHT`"> + <meta attribute="eclassName" inherit="false">Rght</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/manytomany</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RGHTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="cntr" lazy="true" cascade="merge,persist,save-update,lock" inverse="true" table="`RIGHTCENTER`"> + <key update="true"> + <column name="`RGHT_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Cntr" unique="false" foreign-key="RGHT_CNTR"> + <column name="`CNTR_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..fe59c27f5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,40 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mapkey</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writers" where="name='martin'" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <map-key column="`NAME`" type="java.lang.String"/> + <one-to-many entity-name="Writer"/> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mapkey</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..8ffafc284 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mapkey</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writers" where="name='martin'" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <map-key column="`NAME`" type="java.lang.String"/> + <one-to-many entity-name="Writer"/> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mapkey.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mapkey</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MappedSuperClassAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MappedSuperClassAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..20056a39d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MappedSuperClassAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,44 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mappedsuperclass.impl.AddIDDocumentImpl" entity-name="AddIDDocument" abstract="false" lazy="false" table="`ADDIDDOCUMENT`"> + <meta attribute="eclassName" inherit="false">AddIDDocument</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mappedsuperclass</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="myGenericInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYGENERICINFO`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mappedsuperclass.impl.SpecificDocumentImpl" entity-name="SpecificDocument" abstract="false" lazy="false" table="`SPECIFICDOCUMENT`"> + <meta attribute="eclassName" inherit="false">SpecificDocument</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mappedsuperclass</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="myGenericInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYGENERICINFO`"/> + </property> + <property name="myName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PARENTDOCUMENT_NAME`" length="50"/> + </property> + <property name="mySpecificInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYSPECIFICINFO`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MappedSuperClassAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MappedSuperClassAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..fdbe8694f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MappedSuperClassAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,50 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mappedsuperclass.impl.AddIDDocumentImpl" entity-name="AddIDDocument" abstract="false" lazy="false" discriminator-value="AddIDDocument" table="`ADDIDDOCUMENT`"> + <meta attribute="eclassName" inherit="false">AddIDDocument</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mappedsuperclass</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDIDDOCUMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="myGenericInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYGENERICINFO`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.mappedsuperclass.impl.SpecificDocumentImpl" entity-name="SpecificDocument" abstract="false" lazy="false" discriminator-value="SpecificDocument" table="`SPECIFICDOCUMENT`"> + <meta attribute="eclassName" inherit="false">SpecificDocument</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/mappedsuperclass</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SPECIFICDOCUMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="myGenericInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYGENERICINFO`"/> + </property> + <property name="myName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PARENTDOCUMENT_NAME`" length="50"/> + </property> + <property name="mySpecificInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MYSPECIFICINFO`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/NaturalIdAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/NaturalIdAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..9a7c0f45f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/NaturalIdAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,52 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.naturalId.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/naturalid</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <natural-id mutable="false"> + <property name="firstName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </property> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + <many-to-one name="family" entity-name="Family" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_FAMILY" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`FAMILY_FAMILY_ID`"/> + </many-to-one> + </natural-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="age" lazy="false" insert="true" update="true" not-null="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`AGE`"/> + </property> + <property name="callName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CALLNAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.naturalId.impl.FamilyImpl" entity-name="Family" abstract="false" lazy="false" table="`FAMILY`"> + <meta attribute="eclassName" inherit="false">Family</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/naturalid</meta> + <id name="id" type="int" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <natural-id mutable="false"> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </natural-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="age" lazy="false" insert="true" update="true" not-null="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`AGE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/NaturalIdAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/NaturalIdAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..628df6f9c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/NaturalIdAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,58 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.naturalId.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/naturalid</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <natural-id mutable="false"> + <property name="firstName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </property> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + <many-to-one name="family" entity-name="Family" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_FAMILY" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`FAMILY_FAMILY_ID`"/> + </many-to-one> + </natural-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="age" lazy="false" insert="true" update="true" not-null="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`AGE`"/> + </property> + <property name="callName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CALLNAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.naturalId.impl.FamilyImpl" entity-name="Family" abstract="false" lazy="false" discriminator-value="Family" table="`FAMILY`"> + <meta attribute="eclassName" inherit="false">Family</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/naturalid</meta> + <id name="id" type="int" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FAMILYDTYPE" length="255" not-null="true"/> + </discriminator> + <natural-id mutable="false"> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </natural-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="age" lazy="false" insert="true" update="true" not-null="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`AGE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OnetoonePKAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OnetoonePKAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1257c9ddb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OnetoonePKAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,30 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.otopk.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/otopk</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">employeeInfo</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="employeeInfo" entity-name="EmployeeInfo" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" foreign-key="EMPLOYEE_EMPLOYEEINFO" insert="true" update="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.otopk.impl.EmployeeInfoImpl" entity-name="EmployeeInfo" abstract="false" lazy="false" table="`EMPLOYEEINFO`"> + <meta attribute="eclassName" inherit="false">EmployeeInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/otopk</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OnetoonePKAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OnetoonePKAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c28d4ee38 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OnetoonePKAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,36 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.otopk.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" discriminator-value="Employee" table="`EMPLOYEE`"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/otopk</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="foreign"> + <param name="property">employeeInfo</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMPLOYEEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="employeeInfo" entity-name="EmployeeInfo" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" foreign-key="EMPLOYEE_EMPLOYEEINFO" insert="true" update="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.otopk.impl.EmployeeInfoImpl" entity-name="EmployeeInfo" abstract="false" lazy="false" discriminator-value="EmployeeInfo" table="`EMPLOYEEINFO`"> + <meta attribute="eclassName" inherit="false">EmployeeInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/otopk</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="EMPLOYEEINFODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OverrideSecondaryAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OverrideSecondaryAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..eec6fd439 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OverrideSecondaryAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" extends="Person" discriminator-value="Employee"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <join table="`SECONDARY_TABLE`"> + <key/> + <component name="address" class="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.AddressImpl"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`OTHER_NAME`"/> + </property> + <property name="street" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`OTHER_STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`OTHER_CITY`"/> + </property> + <many-to-one name="country" entity-name="Country" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDR_COUNTRY`"/> + </many-to-one> + </component> + <property name="employeeNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`EMP_NUM`"/> + </property> + </join> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.NonEmployeeImpl" entity-name="NonEmployee" abstract="false" lazy="false" extends="Person" discriminator-value="NonEmployee"> + <meta attribute="eclassName" inherit="false">NonEmployee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <component name="address" class="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.AddressImpl"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS_NAME`"/> + </property> + <property name="street" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS_STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS_CITY`"/> + </property> + <many-to-one name="country" entity-name="Country" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`COUNTRY_COUNTRY_E_ID`"/> + </many-to-one> + </component> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.CountryImpl" entity-name="Country" abstract="false" lazy="false" table="`COUNTRY`"> + <meta attribute="eclassName" inherit="false">Country</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OverrideSecondaryAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OverrideSecondaryAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..27f4024b5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/OverrideSecondaryAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,88 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" extends="Person" discriminator-value="Employee"> + <meta attribute="eclassName" inherit="false">Employee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <join table="`SECONDARY_TABLE`"> + <key/> + <component name="address" class="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.AddressImpl"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`OTHER_NAME`"/> + </property> + <property name="street" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`OTHER_STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`OTHER_CITY`"/> + </property> + <many-to-one name="country" entity-name="Country" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDR_COUNTRY`"/> + </many-to-one> + </component> + <property name="employeeNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`EMP_NUM`"/> + </property> + </join> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.NonEmployeeImpl" entity-name="NonEmployee" abstract="false" lazy="false" extends="Person" discriminator-value="NonEmployee"> + <meta attribute="eclassName" inherit="false">NonEmployee</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <component name="address" class="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.AddressImpl"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS_NAME`"/> + </property> + <property name="street" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS_STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADDRESS_CITY`"/> + </property> + <many-to-one name="country" entity-name="Country" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`COUNTRY_COUNTRY_E_ID`"/> + </many-to-one> + </component> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.attroverridesecondarytable.impl.CountryImpl" entity-name="Country" abstract="false" lazy="false" discriminator-value="Country" table="`COUNTRY`"> + <meta attribute="eclassName" inherit="false">Country</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/attroverridesecondarytable</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COUNTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/PKeyJoinAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/PKeyJoinAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c43473a9f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/PKeyJoinAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,29 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.primarykeyjoin.impl.BodyImpl" entity-name="Body" abstract="false" lazy="false" table="`BODY`"> + <meta attribute="eclassName" inherit="false">Body</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/primarykeyjoin</meta> + <id name="theID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`THEID`"/> + <generator class="foreign"> + <param name="property">head</param> + </generator> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="head" entity-name="Head" cascade="all" not-null="true" lazy="false" foreign-key="BODY_HEAD" insert="true" update="true" unique="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.primarykeyjoin.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/primarykeyjoin</meta> + <id name="myID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/PKeyJoinAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/PKeyJoinAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5d3f3259d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/PKeyJoinAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,35 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.primarykeyjoin.impl.BodyImpl" entity-name="Body" abstract="false" lazy="false" discriminator-value="Body" table="`BODY`"> + <meta attribute="eclassName" inherit="false">Body</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/primarykeyjoin</meta> + <id name="theID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`THEID`"/> + <generator class="foreign"> + <param name="property">head</param> + </generator> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BODYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="head" entity-name="Head" cascade="all" not-null="true" lazy="false" foreign-key="BODY_HEAD" insert="true" update="true" unique="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.primarykeyjoin.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" discriminator-value="Head" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/primarykeyjoin</meta> + <id name="myID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`MYID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="HEADDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..8ba5b57bc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,34 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.secondarytablehibernate.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/secondarytablehibernate</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <join table="`PERSON_ADDRESS`"> + <key> + <column name="`ID`"/> + </key> + <property name="address" lazy="false" insert="true" update="true" not-null="true" unique="false" type="text"> + <column not-null="true" unique="false" name="`ADDRESS`"/> + </property> + </join> + <join table="`PERSON_PHOTO`"> + <key> + <column name="`ID`"/> + </key> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </join> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..79f065027 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,37 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.secondarytablehibernate.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/secondarytablehibernate</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <join table="`PERSON_ADDRESS`"> + <key> + <column name="`ID`"/> + </key> + <property name="address" lazy="false" insert="true" update="true" not-null="true" unique="false" type="text"> + <column not-null="true" unique="false" name="`ADDRESS`"/> + </property> + </join> + <join table="`PERSON_PHOTO`"> + <key> + <column name="`ID`"/> + </key> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </join> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..25dadb7f1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SecondarytableHibernateAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,37 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.secondarytablehibernate.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/secondarytablehibernate</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <join table="`PERSON_ADDRESS`"> + <key> + <column name="`ID`"/> + </key> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </join> + <join table="`PERSON_PHOTO`"> + <key> + <column name="`ID`"/> + </key> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </join> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetNMAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetNMAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..67e6adeba --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetNMAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,49 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.nmset.impl.MyItemImpl" entity-name="MyItem" abstract="false" lazy="false" table="`MYITEM`"> + <meta attribute="eclassName" inherit="false">MyItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/nmset</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="yourItem" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`MYITEM_YOURITEM`"> + <key update="true"> + <column name="`MYITEM_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="YourItem" unique="false" foreign-key="MYITEM_YOURITEM"> + <column name="`YOURITEM_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.nmset.impl.YourItemImpl" entity-name="YourItem" abstract="false" lazy="false" table="`YOURITEM`"> + <meta attribute="eclassName" inherit="false">YourItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/nmset</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="myItem" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MYITEM_YOURITEM`"> + <key update="true"> + <column name="`YOURITEM_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="MyItem" unique="false" foreign-key="YOURITEM_MYITEM"> + <column name="`MYITEM_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetNMAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetNMAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..dad4e68c1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetNMAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,55 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.nmset.impl.MyItemImpl" entity-name="MyItem" abstract="false" lazy="false" discriminator-value="MyItem" table="`MYITEM`"> + <meta attribute="eclassName" inherit="false">MyItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/nmset</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MYITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="yourItem" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`MYITEM_YOURITEM`"> + <key update="true"> + <column name="`MYITEM_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="YourItem" unique="false" foreign-key="MYITEM_YOURITEM"> + <column name="`YOURITEM_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.nmset.impl.YourItemImpl" entity-name="YourItem" abstract="false" lazy="false" discriminator-value="YourItem" table="`YOURITEM`"> + <meta attribute="eclassName" inherit="false">YourItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/nmset</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="YOURITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="myItem" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MYITEM_YOURITEM`"> + <key update="true"> + <column name="`YOURITEM_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="MyItem" unique="false" foreign-key="YOURITEM_MYITEM"> + <column name="`MYITEM_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetResourceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetResourceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..41732e636 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetResourceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ContainedItemImpl" entity-name="ContainedItem" abstract="false" lazy="false" table="`CONTAINEDITEM`"> + <meta attribute="eclassName" inherit="false">ContainedItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="itemList" entity-name="ItemList" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_ITEMLIST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ITEM_ITEMLIST_E_ID`"/> + </many-to-one> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemListImpl" entity-name="ItemList" abstract="false" lazy="false" table="`ITEMLIST`"> + <meta attribute="eclassName" inherit="false">ItemList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="containedItem" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ITEMLIST_CONTAINEDITEM"> + <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="ContainedItem"/> + </bag> + <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ITEM_ITEMLIST_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Item"/> + </bag> + <bag name="joinedItem" order-by="ABS(number)" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ITEMLIST_JOINEDITEM"> + <column name="`ITEMLIST_JOINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Item"/> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetResourceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetResourceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..005e9f2ad --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/SetResourceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,80 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ContainedItemImpl" entity-name="ContainedItem" abstract="false" lazy="false" discriminator-value="ContainedItem" table="`CONTAINEDITEM`"> + <meta attribute="eclassName" inherit="false">ContainedItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTAINEDITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="itemList" entity-name="ItemList" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_ITEMLIST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ITEM_ITEMLIST_E_ID`"/> + </many-to-one> + <property name="number" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`NUMBER`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.set.impl.ItemListImpl" entity-name="ItemList" abstract="false" lazy="false" discriminator-value="ItemList" table="`ITEMLIST`"> + <meta attribute="eclassName" inherit="false">ItemList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/set</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="containedItem" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ITEMLIST_CONTAINEDITEM"> + <column name="`ITEMLIST_CONTAINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="ContainedItem"/> + </bag> + <bag name="item" order-by="`NAME` desc" inverse="true" lazy="extra" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ITEM_ITEMLIST_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Item"/> + </bag> + <bag name="joinedItem" order-by="ABS(number)" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ITEMLIST_JOINEDITEM"> + <column name="`ITEMLIST_JOINEDITEM_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Item"/> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..504c187c1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,64 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.ArmImpl" entity-name="Arm" abstract="false" lazy="false" table="`ARM`"> + <meta attribute="eclassName" inherit="false">Arm</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`LENGTH`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`HAIRCOLOR`"/> + </property> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <many-to-one name="head" entity-name="Head" cascade="all" not-null="false" lazy="false" insert="true" update="true"/> + <many-to-one name="leftArm" entity-name="Arm" not-null="false" lazy="false" foreign-key="PERSON_LEFTARM" insert="true" update="true"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..497d8ac8c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,76 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.ArmImpl" entity-name="Arm" abstract="false" lazy="false" discriminator-value="Arm" table="`ARM`"> + <meta attribute="eclassName" inherit="false">Arm</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ARMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`LENGTH`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" discriminator-value="Head" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="HEADDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`HAIRCOLOR`"/> + </property> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <many-to-one name="head" entity-name="Head" cascade="all" not-null="false" lazy="false" insert="true" update="true"/> + <many-to-one name="leftArm" entity-name="Arm" not-null="false" lazy="false" foreign-key="PERSON_LEFTARM" insert="true" update="true"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..c3d80ba64 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,78 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.ArmImpl" entity-name="Arm" abstract="false" lazy="false" discriminator-value="Arm" table="`ARM`"> + <meta attribute="eclassName" inherit="false">Arm</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ARMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`LENGTH`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" discriminator-value="Head" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="HEADDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`HAIRCOLOR`"/> + </property> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/toone</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <many-to-one name="head" entity-name="Head" cascade="all" not-null="false" lazy="false" insert="true" update="true"/> + <many-to-one name="leftArm" entity-name="Arm" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_LEFTARM" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`ARM_LEFTARM_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2b682db9d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,15 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.transent.impl.BodyImpl" entity-name="Body" abstract="false" lazy="false" table="`BODY`"> + <meta attribute="eclassName" inherit="false">Body</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/transent</meta> + <id name="theID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`THEID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..873393019 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,18 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.transent.impl.BodyImpl" entity-name="Body" abstract="false" lazy="false" discriminator-value="Body" table="`BODY`"> + <meta attribute="eclassName" inherit="false">Body</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/transent</meta> + <id name="theID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`THEID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BODYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..873393019 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/TransientAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,18 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.transent.impl.BodyImpl" entity-name="Body" abstract="false" lazy="false" discriminator-value="Body" table="`BODY`"> + <meta attribute="eclassName" inherit="false">Body</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/transent</meta> + <id name="theID" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`THEID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BODYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3bb969ad0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,39 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.uniqueconstraints.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`MYITEMTABLE`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/uniqueconstraints</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYSTR`" unique-key="c0"/> + </property> + <many-to-one name="project" entity-name="Project" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_PROJECT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYPROJECT`" unique-key="c0"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MYINT`" unique-key="c0"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.uniqueconstraints.impl.ProjectImpl" entity-name="Project" abstract="false" lazy="false" table="`PROJECT`"> + <meta attribute="eclassName" inherit="false">Project</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/uniqueconstraints</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..447695fed --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,45 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.uniqueconstraints.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`MYITEMTABLE`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/uniqueconstraints</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MYITEMTABLEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYSTR`" unique-key="c0"/> + </property> + <many-to-one name="project" entity-name="Project" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_PROJECT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYPROJECT`" unique-key="c0"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MYINT`" unique-key="c0"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.uniqueconstraints.impl.ProjectImpl" entity-name="Project" abstract="false" lazy="false" discriminator-value="Project" table="`PROJECT`"> + <meta attribute="eclassName" inherit="false">Project</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/uniqueconstraints</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PROJECTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..97144c5e5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/UniqueConstraintsAction_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,45 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.uniqueconstraints.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/uniqueconstraints</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYSTR`" unique-key="c0"/> + </property> + <many-to-one name="project" entity-name="Project" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ITEM_PROJECT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYPROJECT`" unique-key="c0"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`MYINT`" unique-key="c0"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.uniqueconstraints.impl.ProjectImpl" entity-name="Project" abstract="false" lazy="false" discriminator-value="Project" table="`PROJECT`"> + <meta attribute="eclassName" inherit="false">Project</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/uniqueconstraints</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PROJECTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/VariousAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/VariousAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b1b89e755 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/VariousAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,51 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.various.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" batch-size="9" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/various</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="children" batch-size="11" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`PARENT_CHILDREN_E_ID`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + <property name="totalPeople" lazy="false" not-null="false" type="int"> + <formula>(select count(*) from parent)</formula> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.annotations.various.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Parent" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/various</meta> + <key> + <column name="`PARENT_E_ID`"/> + </key> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.various.impl.ImmutableCityImpl" entity-name="ImmutableCity" abstract="false" lazy="false" mutable="false" table="`IMMUTABLECITY`"> + <meta attribute="eclassName" inherit="false">ImmutableCity</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/various</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="parents" mutable="false" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="IMMUTABLECITY_PARENTS"> + <column name="`IMMUTABLECITY_PARENTS_E_ID`" unique="false"/> + </key> + <list-index column="`IMMUTABLECITY_PARENTS_IDX`"/> + <one-to-many entity-name="Parent"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/VariousAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/VariousAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..29816bdd4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/VariousAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,51 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.various.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" batch-size="9" discriminator-value="Parent" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/various</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string" force="true"> + <column name="`DTYPE`" index="PARENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="children" batch-size="11" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PARENT_CHILDREN"> + <column name="`PARENT_CHILDREN_E_ID`" unique="false"/> + </key> + <list-index column="`PARENT_CHILDREN_IDX`"/> + <one-to-many entity-name="Child"/> + </list> + <property name="totalPeople" lazy="false" not-null="false" type="int"> + <formula>(select count(*) from parent)</formula> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.annotations.various.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Parent" discriminator-value="Child"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/various</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.annotations.various.impl.ImmutableCityImpl" entity-name="ImmutableCity" abstract="false" lazy="false" mutable="false" table="`IMMUTABLECITY`"> + <meta attribute="eclassName" inherit="false">ImmutableCity</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/various</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="parents" mutable="false" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="IMMUTABLECITY_PARENTS"> + <column name="`IMMUTABLECITY_PARENTS_E_ID`" unique="false"/> + </key> + <list-index column="`IMMUTABLECITY_PARENTS_IDX`"/> + <one-to-many entity-name="Parent"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.detach/DetachEListAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.detach/DetachEListAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3d9afcd4b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.detach/DetachEListAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,51 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachelist.impl.ContactsImpl" entity-name="Contacts" abstract="false" lazy="false" table="`CONTACTS`"> + <meta attribute="eclassName" inherit="false">Contacts</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachelist</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="persons" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTACTS_PERSONS"> + <column name="`CONTACTS_PERSONS_E_ID`" unique="false"/> + </key> + <list-index column="`CONTACTS_PERSONS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + <list name="containedPersons" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CONTACTS_CONTAINEDPERSONS"> + <column name="`CONTACTS_CONTAINEDPERSONS_E_ID`" unique="false"/> + </key> + <list-index column="`CONTACTS_CONTAINEDPERSONS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachelist.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachelist</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="children" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_CHILDREN"> + <column name="`PERSON_CHILDREN_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_CHILDREN_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.detach/DetachEListAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.detach/DetachEListAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6919d6055 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.detach/DetachEListAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,57 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachelist.impl.ContactsImpl" entity-name="Contacts" abstract="false" lazy="false" discriminator-value="Contacts" table="`CONTACTS`"> + <meta attribute="eclassName" inherit="false">Contacts</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachelist</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTACTSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="persons" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTACTS_PERSONS"> + <column name="`CONTACTS_PERSONS_E_ID`" unique="false"/> + </key> + <list-index column="`CONTACTS_PERSONS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + <list name="containedPersons" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CONTACTS_CONTAINEDPERSONS"> + <column name="`CONTACTS_CONTAINEDPERSONS_E_ID`" unique="false"/> + </key> + <list-index column="`CONTACTS_CONTAINEDPERSONS_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.detach.detachelist.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/detach/detachelist</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="children" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_CHILDREN"> + <column name="`PERSON_CHILDREN_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_CHILDREN_IDX`"/> + <one-to-many entity-name="Person"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..17faace93 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,135 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.ContainedChildNRImpl" entity-name="ContainedChildNR" abstract="false" lazy="false" table="`CONTAINEDCHILDNR`"> + <meta attribute="eclassName" inherit="false">ContainedChildNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.ContainedChildRImpl" entity-name="ContainedChildR" abstract="false" lazy="false" table="`CONTAINEDCHILDR`"> + <meta attribute="eclassName" inherit="false">ContainedChildR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.MainImpl" entity-name="Main" abstract="false" lazy="false" table="`MAIN`"> + <meta attribute="eclassName" inherit="false">Main</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="containedonewayrequired" entity-name="ContainedChildR" lazy="false" cascade="all" foreign-key="MAIN_CONTAINEDONEWAYREQUIRED" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`CONTAINEDCHILDR_CONTAINEDONEWAYREQUIRED_E_ID`"/> + </many-to-one> + <many-to-one name="containedoneWaynotrequired" entity-name="ContainedChildNR" lazy="false" cascade="all" foreign-key="MAIN_CONTAINEDONEWAYNOTREQUIRED" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CONTAINEDCHILDNR_CONTAINEDONEWAYNOTREQUIRED_E_ID`"/> + </many-to-one> + <many-to-one name="notcontainedonewayrequired" entity-name="NotContainedChildR" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MAIN_NOTCONTAINEDONEWAYREQUIRED" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`NOTCONTAINEDCHILDR_NOTCONTAINEDONEWAYREQUIRED_E_ID`"/> + </many-to-one> + <many-to-one name="notcontainedonewaynotrequired" entity-name="NotContainedChildNR" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MAIN_NOTCONTAINEDONEWAYNOTREQUIRED" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`NOTCONTAINEDCHILDNR_NOTCONTAINEDONEWAYNOTREQUIRED_E_ID`"/> + </many-to-one> + <one-to-one name="notcontainedtwowaynotrequired" entity-name="NotContainedChildNRT" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main" constrained="true"/> + <one-to-one name="notcontainedtwowaynotrequirednr" entity-name="NotContainedChildNRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRImpl" entity-name="NotContainedChildNR" abstract="false" lazy="false" table="`NOTCONTAINEDCHILDNR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRTImpl" entity-name="NotContainedChildNRT" abstract="false" lazy="false" table="`NOTCONTAINEDCHILDNRT`"> + <meta attribute="eclassName" inherit="false">NotContainedChildNRT</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" cascade="merge,persist,save-update,lock,refresh" not-null="true" lazy="false" insert="true" update="true" unique="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRTNRImpl" entity-name="NotContainedChildNRTNR" abstract="false" lazy="false" table="`NOTCONTAINEDCHILDNRTNR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildNRTNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" insert="true" update="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildRImpl" entity-name="NotContainedChildR" abstract="false" lazy="false" table="`NOTCONTAINEDCHILDR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildRTNRImpl" entity-name="NotContainedChildRTNR" abstract="false" lazy="false" table="`NOTCONTAINEDCHILDRTNR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildRTNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" insert="true" update="true"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..9204fe066 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,159 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.ContainedChildNRImpl" entity-name="ContainedChildNR" abstract="false" lazy="false" discriminator-value="ContainedChildNR" table="`CONTAINEDCHILDNR`"> + <meta attribute="eclassName" inherit="false">ContainedChildNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTAINEDCHILDNRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.ContainedChildRImpl" entity-name="ContainedChildR" abstract="false" lazy="false" discriminator-value="ContainedChildR" table="`CONTAINEDCHILDR`"> + <meta attribute="eclassName" inherit="false">ContainedChildR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTAINEDCHILDRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.MainImpl" entity-name="Main" abstract="false" lazy="false" discriminator-value="Main" table="`MAIN`"> + <meta attribute="eclassName" inherit="false">Main</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MAINDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="containedonewayrequired" entity-name="ContainedChildR" lazy="false" cascade="all" foreign-key="MAIN_CONTAINEDONEWAYREQUIRED" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`CONTAINEDCHILDR_CONTAINEDONEWAYREQUIRED_E_ID`"/> + </many-to-one> + <many-to-one name="containedoneWaynotrequired" entity-name="ContainedChildNR" lazy="false" cascade="all" foreign-key="MAIN_CONTAINEDONEWAYNOTREQUIRED" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CONTAINEDCHILDNR_CONTAINEDONEWAYNOTREQUIRED_E_ID`"/> + </many-to-one> + <many-to-one name="notcontainedonewayrequired" entity-name="NotContainedChildR" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MAIN_NOTCONTAINEDONEWAYREQUIRED" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`NOTCONTAINEDCHILDR_NOTCONTAINEDONEWAYREQUIRED_E_ID`"/> + </many-to-one> + <many-to-one name="notcontainedonewaynotrequired" entity-name="NotContainedChildNR" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MAIN_NOTCONTAINEDONEWAYNOTREQUIRED" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`NOTCONTAINEDCHILDNR_NOTCONTAINEDONEWAYNOTREQUIRED_E_ID`"/> + </many-to-one> + <one-to-one name="notcontainedtwowaynotrequired" entity-name="NotContainedChildNRT" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main" constrained="true"/> + <one-to-one name="notcontainedtwowaynotrequirednr" entity-name="NotContainedChildNRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRImpl" entity-name="NotContainedChildNR" abstract="false" lazy="false" discriminator-value="NotContainedChildNR" table="`NOTCONTAINEDCHILDNR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NOTCONTAINEDCHILDNRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRTImpl" entity-name="NotContainedChildNRT" abstract="false" lazy="false" discriminator-value="NotContainedChildNRT" table="`NOTCONTAINEDCHILDNRT`"> + <meta attribute="eclassName" inherit="false">NotContainedChildNRT</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NOTCONTAINEDCHILDNRTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" cascade="merge,persist,save-update,lock,refresh" not-null="true" lazy="false" insert="true" update="true" unique="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRTNRImpl" entity-name="NotContainedChildNRTNR" abstract="false" lazy="false" discriminator-value="NotContainedChildNRTNR" table="`NOTCONTAINEDCHILDNRTNR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildNRTNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NOTCONTAINEDCHILDNRTNRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" insert="true" update="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildRImpl" entity-name="NotContainedChildR" abstract="false" lazy="false" discriminator-value="NotContainedChildR" table="`NOTCONTAINEDCHILDR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NOTCONTAINEDCHILDRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildRTNRImpl" entity-name="NotContainedChildRTNR" abstract="false" lazy="false" discriminator-value="NotContainedChildRTNR" table="`NOTCONTAINEDCHILDRTNR`"> + <meta attribute="eclassName" inherit="false">NotContainedChildRTNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1to1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NOTCONTAINEDCHILDRTNRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" cascade="merge,persist,save-update,lock,refresh" not-null="false" lazy="false" insert="true" update="true"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1tonAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1tonAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..10c963774 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1tonAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,199 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.MainImpl" entity-name="Main" abstract="false" lazy="false" table="`MAIN`"> + <meta attribute="eclassName" inherit="false">Main</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="onecr" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_ONECR"> + <column name="`MAIN_ONECR_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONECR_IDX`"/> + <one-to-many entity-name="OneCR"/> + </list> + <list name="onecn" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_ONECN"> + <column name="`MAIN_ONECN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONECN_IDX`"/> + <one-to-many entity-name="OneCN"/> + </list> + <list name="onenr" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="MAIN_ONENR"> + <column name="`MAIN_ONENR_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONENR_IDX`"/> + <one-to-many entity-name="OneNR"/> + </list> + <list name="onenn" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="MAIN_ONENN"> + <column name="`MAIN_ONENN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONENN_IDX`"/> + <one-to-many entity-name="OneNN"/> + </list> + <list name="twocr" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_TWOCR"> + <column name="`TWOCR_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWOCR_IDX`"/> + <one-to-many entity-name="TwoCR"/> + </list> + <list name="twocn" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_TWOCN"> + <column name="`TWOCN_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWOCN_IDX`"/> + <one-to-many entity-name="TwoCN"/> + </list> + <list name="twonr" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TWONR_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWONR_IDX`"/> + <one-to-many entity-name="TwoNR"/> + </list> + <list name="twonn" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TWONN_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWONN_IDX`"/> + <one-to-many entity-name="TwoNN"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneCNImpl" entity-name="OneCN" abstract="false" lazy="false" table="`ONECN`"> + <meta attribute="eclassName" inherit="false">OneCN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneCRImpl" entity-name="OneCR" abstract="false" lazy="false" table="`ONECR`"> + <meta attribute="eclassName" inherit="false">OneCR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneNNImpl" entity-name="OneNN" abstract="false" lazy="false" table="`ONENN`"> + <meta attribute="eclassName" inherit="false">OneNN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneNRImpl" entity-name="OneNR" abstract="false" lazy="false" table="`ONENR`"> + <meta attribute="eclassName" inherit="false">OneNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoCNImpl" entity-name="TwoCN" abstract="false" lazy="false" table="`TWOCN`"> + <meta attribute="eclassName" inherit="false">TwoCN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWOCN_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWOCN_MAIN_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoCRImpl" entity-name="TwoCR" abstract="false" lazy="false" table="`TWOCR`"> + <meta attribute="eclassName" inherit="false">TwoCR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWOCR_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWOCR_MAIN_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoNNImpl" entity-name="TwoNN" abstract="false" lazy="false" table="`TWONN`"> + <meta attribute="eclassName" inherit="false">TwoNN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWONN_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWONN_MAIN_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoNRImpl" entity-name="TwoNR" abstract="false" lazy="false" table="`TWONR`"> + <meta attribute="eclassName" inherit="false">TwoNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWONR_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWONR_MAIN_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1tonAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1tonAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..7dd638091 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1tonAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,226 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.MainImpl" entity-name="Main" abstract="false" lazy="false" discriminator-value="Main" table="`MAIN`"> + <meta attribute="eclassName" inherit="false">Main</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MAINDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="onecr" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_ONECR"> + <column name="`MAIN_ONECR_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONECR_IDX`"/> + <one-to-many entity-name="OneCR"/> + </list> + <list name="onecn" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_ONECN"> + <column name="`MAIN_ONECN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONECN_IDX`"/> + <one-to-many entity-name="OneCN"/> + </list> + <list name="onenr" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="MAIN_ONENR"> + <column name="`MAIN_ONENR_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONENR_IDX`"/> + <one-to-many entity-name="OneNR"/> + </list> + <list name="onenn" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="MAIN_ONENN"> + <column name="`MAIN_ONENN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_ONENN_IDX`"/> + <one-to-many entity-name="OneNN"/> + </list> + <list name="twocr" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_TWOCR"> + <column name="`TWOCR_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWOCR_IDX`"/> + <one-to-many entity-name="TwoCR"/> + </list> + <list name="twocn" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAIN_TWOCN"> + <column name="`TWOCN_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWOCN_IDX`"/> + <one-to-many entity-name="TwoCN"/> + </list> + <list name="twonr" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TWONR_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWONR_IDX`"/> + <one-to-many entity-name="TwoNR"/> + </list> + <list name="twonn" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TWONN_MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_TWONN_IDX`"/> + <one-to-many entity-name="TwoNN"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneCNImpl" entity-name="OneCN" abstract="false" lazy="false" discriminator-value="OneCN" table="`ONECN`"> + <meta attribute="eclassName" inherit="false">OneCN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONECNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneCRImpl" entity-name="OneCR" abstract="false" lazy="false" discriminator-value="OneCR" table="`ONECR`"> + <meta attribute="eclassName" inherit="false">OneCR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONECRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneNNImpl" entity-name="OneNN" abstract="false" lazy="false" discriminator-value="OneNN" table="`ONENN`"> + <meta attribute="eclassName" inherit="false">OneNN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONENNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.OneNRImpl" entity-name="OneNR" abstract="false" lazy="false" discriminator-value="OneNR" table="`ONENR`"> + <meta attribute="eclassName" inherit="false">OneNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONENRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoCNImpl" entity-name="TwoCN" abstract="false" lazy="false" discriminator-value="TwoCN" table="`TWOCN`"> + <meta attribute="eclassName" inherit="false">TwoCN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TWOCNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWOCN_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWOCN_MAIN_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoCRImpl" entity-name="TwoCR" abstract="false" lazy="false" discriminator-value="TwoCR" table="`TWOCR`"> + <meta attribute="eclassName" inherit="false">TwoCR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TWOCRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWOCR_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWOCR_MAIN_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoNNImpl" entity-name="TwoNN" abstract="false" lazy="false" discriminator-value="TwoNN" table="`TWONN`"> + <meta attribute="eclassName" inherit="false">TwoNN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TWONNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWONN_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWONN_MAIN_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1ton.impl.TwoNRImpl" entity-name="TwoNR" abstract="false" lazy="false" discriminator-value="TwoNR" table="`TWONR`"> + <meta attribute="eclassName" inherit="false">TwoNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relation1ton</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TWONRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <many-to-one name="main" entity-name="Main" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TWONR_MAIN" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TWONR_MAIN_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/RelationntomAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/RelationntomAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e47e7d330 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/RelationntomAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,115 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MainImpl" entity-name="Main" abstract="false" lazy="false" table="`MAIN`"> + <meta attribute="eclassName" inherit="false">Main</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="multinr" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MAIN_MULTINR`"> + <key update="true"> + <column name="`MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_MULTINR_IDX`"/> + <many-to-many entity-name="MultiNR" unique="false" foreign-key="MAIN_MULTINR"> + <column name="`MULTINR_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + <list name="multirn" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MAIN_MULTIRN`"> + <key update="true"> + <column name="`MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_MULTIRN_IDX`"/> + <many-to-many entity-name="MultiRN" unique="false" foreign-key="MAIN_MULTIRN"> + <column name="`MULTIRN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + <list name="multinn" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MAIN_MULTINN`"> + <key update="true"> + <column name="`MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_MULTINN_IDX`"/> + <many-to-many entity-name="MultiNN" unique="false" foreign-key="MAIN_MULTINN"> + <column name="`MULTINN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MultiNNImpl" entity-name="MultiNN" abstract="false" lazy="false" table="`MULTINN`"> + <meta attribute="eclassName" inherit="false">MultiNN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="main" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MULTINN_MAIN`"> + <key update="true"> + <column name="`MULTINN_E_ID`" unique="false"/> + </key> + <list-index column="`MULTINN_MAIN_IDX`"/> + <many-to-many entity-name="Main" unique="false" foreign-key="MULTINN_MAIN"> + <column name="`MAIN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MultiNRImpl" entity-name="MultiNR" abstract="false" lazy="false" table="`MULTINR`"> + <meta attribute="eclassName" inherit="false">MultiNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="main" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MULTINR_MAIN`"> + <key update="true"> + <column name="`MULTINR_E_ID`" unique="false"/> + </key> + <list-index column="`MULTINR_MAIN_IDX`"/> + <many-to-many entity-name="Main" unique="false" foreign-key="MULTINR_MAIN"> + <column name="`MAIN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MultiRNImpl" entity-name="MultiRN" abstract="false" lazy="false" table="`MULTIRN`"> + <meta attribute="eclassName" inherit="false">MultiRN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="main" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MULTIRN_MAIN`"> + <key update="true"> + <column name="`MULTIRN_E_ID`" unique="false"/> + </key> + <list-index column="`MULTIRN_MAIN_IDX`"/> + <many-to-many entity-name="Main" unique="false" foreign-key="MULTIRN_MAIN"> + <column name="`MAIN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/RelationntomAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/RelationntomAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..232253972 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/RelationntomAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,127 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MainImpl" entity-name="Main" abstract="false" lazy="false" discriminator-value="Main" table="`MAIN`"> + <meta attribute="eclassName" inherit="false">Main</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MAINDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="multinr" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MAIN_MULTINR`"> + <key update="true"> + <column name="`MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_MULTINR_IDX`"/> + <many-to-many entity-name="MultiNR" unique="false" foreign-key="MAIN_MULTINR"> + <column name="`MULTINR_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + <list name="multirn" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MAIN_MULTIRN`"> + <key update="true"> + <column name="`MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_MULTIRN_IDX`"/> + <many-to-many entity-name="MultiRN" unique="false" foreign-key="MAIN_MULTIRN"> + <column name="`MULTIRN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + <list name="multinn" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MAIN_MULTINN`"> + <key update="true"> + <column name="`MAIN_E_ID`" unique="false"/> + </key> + <list-index column="`MAIN_MULTINN_IDX`"/> + <many-to-many entity-name="MultiNN" unique="false" foreign-key="MAIN_MULTINN"> + <column name="`MULTINN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MultiNNImpl" entity-name="MultiNN" abstract="false" lazy="false" discriminator-value="MultiNN" table="`MULTINN`"> + <meta attribute="eclassName" inherit="false">MultiNN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MULTINNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="main" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MULTINN_MAIN`"> + <key update="true"> + <column name="`MULTINN_E_ID`" unique="false"/> + </key> + <list-index column="`MULTINN_MAIN_IDX`"/> + <many-to-many entity-name="Main" unique="false" foreign-key="MULTINN_MAIN"> + <column name="`MAIN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MultiNRImpl" entity-name="MultiNR" abstract="false" lazy="false" discriminator-value="MultiNR" table="`MULTINR`"> + <meta attribute="eclassName" inherit="false">MultiNR</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MULTINRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="main" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MULTINR_MAIN`"> + <key update="true"> + <column name="`MULTINR_E_ID`" unique="false"/> + </key> + <list-index column="`MULTINR_MAIN_IDX`"/> + <many-to-many entity-name="Main" unique="false" foreign-key="MULTINR_MAIN"> + <column name="`MAIN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.relation.relationntom.impl.MultiRNImpl" entity-name="MultiRN" abstract="false" lazy="false" discriminator-value="MultiRN" table="`MULTIRN`"> + <meta attribute="eclassName" inherit="false">MultiRN</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/relation/relationntom</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MULTIRNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="main" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`MULTIRN_MAIN`"> + <key update="true"> + <column name="`MULTIRN_E_ID`" unique="false"/> + </key> + <list-index column="`MULTIRN_MAIN_IDX`"/> + <many-to-many entity-name="Main" unique="false" foreign-key="MULTIRN_MAIN"> + <column name="`MAIN_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..0e583cadf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,115 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="com.example.car.impl.CarFrameImpl" entity-name="CarFrame" abstract="false" lazy="false" table="`CARFRAME`"> + <meta attribute="eclassName" inherit="false">CarFrame</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carWheel" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARFRAME_CARWHEEL"> + <column name="`CARFRAME_CARWHEEL_E_ID`" unique="false"/> + </key> + <list-index column="`CARFRAME_CARWHEEL_IDX`"/> + <one-to-many entity-name="CarWheel"/> + </list> + <many-to-one name="carLinkRef" entity-name="CarLink" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CARFRAME_CARLINKREF" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CARLINK_CARLINKREF_E_ID`"/> + </many-to-one> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="com.example.car.impl.CarLinkImpl" entity-name="CarLink" abstract="false" lazy="false" table="`CARLINK`"> + <meta attribute="eclassName" inherit="false">CarLink</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id name="carLinkId" type="java.lang.String"> + <column not-null="true" unique="false" name="`CARLINKID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="com.example.car.impl.CarsListImpl" entity-name="CarsList" abstract="false" lazy="false" table="`CARSLIST`"> + <meta attribute="eclassName" inherit="false">CarsList</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carType" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARSLIST_CARTYPE"> + <column name="`CARSLIST_CARTYPE_E_ID`" unique="false"/> + </key> + <list-index column="`CARSLIST_CARTYPE_IDX`"/> + <one-to-many entity-name="CarType"/> + </list> + <list name="carLink" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARSLIST_CARLINK"> + <column name="`CARSLIST_CARLINK_E_ID`" unique="false"/> + </key> + <list-index column="`CARSLIST_CARLINK_IDX`"/> + <one-to-many entity-name="CarLink"/> + </list> + </class> + <class name="com.example.car.impl.CarTireImpl" entity-name="CarTire" abstract="false" lazy="false" table="`CARTIRE`"> + <meta attribute="eclassName" inherit="false">CarTire</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="com.example.car.impl.CarTypeImpl" entity-name="CarType" abstract="false" lazy="false" table="`CARTYPE`"> + <meta attribute="eclassName" inherit="false">CarType</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id name="carID" type="java.lang.String"> + <column not-null="true" unique="false" name="`CARID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carFrame" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARTYPE_CARFRAME"> + <column name="`CARTYPE_CARFRAME_E_ID`" unique="false"/> + </key> + <list-index column="`CARTYPE_CARFRAME_IDX`"/> + <one-to-many entity-name="CarFrame"/> + </list> + </class> + <class name="com.example.car.impl.CarWheelImpl" entity-name="CarWheel" abstract="false" lazy="false" table="`CARWHEEL`"> + <meta attribute="eclassName" inherit="false">CarWheel</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carTire" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARWHEEL_CARTIRE"> + <column name="`CARWHEEL_CARTIRE_E_ID`" unique="false"/> + </key> + <list-index column="`CARWHEEL_CARTIRE_IDX`"/> + <one-to-many entity-name="CarTire"/> + </list> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0f8255ee5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,133 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="com.example.car.impl.CarFrameImpl" entity-name="CarFrame" abstract="false" lazy="false" discriminator-value="CarFrame" table="`CARFRAME`"> + <meta attribute="eclassName" inherit="false">CarFrame</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CARFRAMEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carWheel" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARFRAME_CARWHEEL"> + <column name="`CARFRAME_CARWHEEL_E_ID`" unique="false"/> + </key> + <list-index column="`CARFRAME_CARWHEEL_IDX`"/> + <one-to-many entity-name="CarWheel"/> + </list> + <many-to-one name="carLinkRef" entity-name="CarLink" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CARFRAME_CARLINKREF" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CARLINK_CARLINKREF_E_ID`"/> + </many-to-one> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="com.example.car.impl.CarLinkImpl" entity-name="CarLink" abstract="false" lazy="false" discriminator-value="CarLink" table="`CARLINK`"> + <meta attribute="eclassName" inherit="false">CarLink</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id name="carLinkId" type="java.lang.String"> + <column not-null="true" unique="false" name="`CARLINKID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CARLINKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="com.example.car.impl.CarsListImpl" entity-name="CarsList" abstract="false" lazy="false" discriminator-value="CarsList" table="`CARSLIST`"> + <meta attribute="eclassName" inherit="false">CarsList</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CARSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carType" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARSLIST_CARTYPE"> + <column name="`CARSLIST_CARTYPE_E_ID`" unique="false"/> + </key> + <list-index column="`CARSLIST_CARTYPE_IDX`"/> + <one-to-many entity-name="CarType"/> + </list> + <list name="carLink" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARSLIST_CARLINK"> + <column name="`CARSLIST_CARLINK_E_ID`" unique="false"/> + </key> + <list-index column="`CARSLIST_CARLINK_IDX`"/> + <one-to-many entity-name="CarLink"/> + </list> + </class> + <class name="com.example.car.impl.CarTireImpl" entity-name="CarTire" abstract="false" lazy="false" discriminator-value="CarTire" table="`CARTIRE`"> + <meta attribute="eclassName" inherit="false">CarTire</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CARTIREDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="com.example.car.impl.CarTypeImpl" entity-name="CarType" abstract="false" lazy="false" discriminator-value="CarType" table="`CARTYPE`"> + <meta attribute="eclassName" inherit="false">CarType</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id name="carID" type="java.lang.String"> + <column not-null="true" unique="false" name="`CARID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CARTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carFrame" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARTYPE_CARFRAME"> + <column name="`CARTYPE_CARFRAME_E_ID`" unique="false"/> + </key> + <list-index column="`CARTYPE_CARFRAME_IDX`"/> + <one-to-many entity-name="CarFrame"/> + </list> + </class> + <class name="com.example.car.impl.CarWheelImpl" entity-name="CarWheel" abstract="false" lazy="false" discriminator-value="CarWheel" table="`CARWHEEL`"> + <meta attribute="eclassName" inherit="false">CarWheel</meta> + <meta attribute="epackage" inherit="false">http://www.example.com/car.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CARWHEELDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="carTire" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CARWHEEL_CARTIRE"> + <column name="`CARWHEEL_CARTIRE_E_ID`" unique="false"/> + </key> + <list-index column="`CARWHEEL_CARTIRE_IDX`"/> + <one-to-many entity-name="CarTire"/> + </list> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CatalogResourceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CatalogResourceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..0456c4d72 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CatalogResourceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,106 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.CatalogTypeImpl" entity-name="CatalogType" abstract="false" lazy="false" table="`CATALOGTYPE`"> + <meta attribute="eclassName" inherit="false">CatalogType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="subCatalog" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_SUBCATALOG"> + <column name="`CATALOGTYPE_SUBCATALOG_NAME`" unique="false"/> + </key> + <list-index column="`CATALOGTYPE_SUBCATALOG_IDX`"/> + <one-to-many entity-name="CatalogType"/> + </list> + <list name="product" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_PRODUCT"> + <column name="`CATALOGTYPE_PRODUCT_NAME`" unique="false"/> + </key> + <list-index column="`CATALOGTYPE_PRODUCT_IDX`"/> + <one-to-many entity-name="ProductType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.PriceTypeImpl" entity-name="PriceType" abstract="false" lazy="false" table="`PRICETYPE`"> + <meta attribute="eclassName" inherit="false">PriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantityTo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITYTO`"/> + </property> + <many-to-one name="supplier" entity-name="SupplierType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRICETYPE_SUPPLIER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SUPPLIERTYPE_SUPPLIER_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id name="code" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="remark" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PRODUCTTYPE_REMARK"> + <column name="`PRODUCTTYPE_REMARK_CODE`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_REMARK_IDX`"/> + <one-to-many entity-name="StringType"/> + </list> + <many-to-one name="price" entity-name="PriceType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PRICETYPE_PRICE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.StringTypeImpl" entity-name="StringType" abstract="false" lazy="false" table="`STRINGTYPE`"> + <meta attribute="eclassName" inherit="false">StringType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" table="`SUPPLIERTYPE`"> + <meta attribute="eclassName" inherit="false">SupplierType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="noOfEmployees" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NOOFEMPLOYEES`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CatalogResourceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CatalogResourceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..9552541bf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CatalogResourceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,121 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.CatalogTypeImpl" entity-name="CatalogType" abstract="false" lazy="false" discriminator-value="CatalogType" table="`CATALOGTYPE`"> + <meta attribute="eclassName" inherit="false">CatalogType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CATALOGTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="subCatalog" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_SUBCATALOG"> + <column name="`CATALOGTYPE_SUBCATALOG_NAME`" unique="false"/> + </key> + <list-index column="`CATALOGTYPE_SUBCATALOG_IDX`"/> + <one-to-many entity-name="CatalogType"/> + </list> + <list name="product" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CATALOGTYPE_PRODUCT"> + <column name="`CATALOGTYPE_PRODUCT_NAME`" unique="false"/> + </key> + <list-index column="`CATALOGTYPE_PRODUCT_IDX`"/> + <one-to-many entity-name="ProductType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.PriceTypeImpl" entity-name="PriceType" abstract="false" lazy="false" discriminator-value="PriceType" table="`PRICETYPE`"> + <meta attribute="eclassName" inherit="false">PriceType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRICETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="quantityTo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`QUANTITYTO`"/> + </property> + <many-to-one name="supplier" entity-name="SupplierType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRICETYPE_SUPPLIER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SUPPLIERTYPE_SUPPLIER_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" discriminator-value="ProductType" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id name="code" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <list name="remark" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PRODUCTTYPE_REMARK"> + <column name="`PRODUCTTYPE_REMARK_CODE`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_REMARK_IDX`"/> + <one-to-many entity-name="StringType"/> + </list> + <many-to-one name="price" entity-name="PriceType" lazy="false" cascade="all" foreign-key="PRODUCTTYPE_PRICE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PRICETYPE_PRICE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.StringTypeImpl" entity-name="StringType" abstract="false" lazy="false" discriminator-value="StringType" table="`STRINGTYPE`"> + <meta attribute="eclassName" inherit="false">StringType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.catalog.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" discriminator-value="SupplierType" table="`SUPPLIERTYPE`"> + <meta attribute="eclassName" inherit="false">SupplierType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/catalog</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="noOfEmployees" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NOOFEMPLOYEES`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ClaimAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ClaimAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..94e48be98 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ClaimAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,65 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimImpl" entity-name="Claim" abstract="false" lazy="false" table="`PCLM_NPRC_CLM`"> + <meta attribute="eclassName" inherit="false">Claim</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <composite-id name="claimCompositeKey" class="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimCompositeKeyImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">ClaimCompositeKey</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <key-property name="claimNumber" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_NBR`" unique-key="c0"/> + </key-property> + <key-property name="claimExtensionNumber" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_EXT_NBR`" unique-key="c0"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="billingName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BILLING_NAME`" length="50"/> + </property> + <property name="claimGroupVSPId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_GRP_VSP_ID`" length="3"/> + </property> + <property name="claimStatus" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_STATUS`" length="2"/> + </property> + <bag name="claimLine" inverse="true" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CLAIM_CLAIMLINE"> + <column name="`CLM_NBR`" unique="false"/> + <column name="`CLM_EXT_NBR`" unique="false"/> + </key> + <one-to-many entity-name="ClaimLine"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimLineImpl" entity-name="ClaimLine" abstract="false" lazy="false" table="`PCLM_NPRC_CLMLN`"> + <meta attribute="eclassName" inherit="false">ClaimLine</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <composite-id name="claimLineCompositeKey" class="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimLineCompositeKeyImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">ClaimLineCompositeKey</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <key-many-to-one name="claim" entity-name="Claim" foreign-key="CLAIMLINECOMPOSITEKEY_CLAIM" lazy="false"> + <column not-null="false" unique="false" name="`CLM_NBR`" unique-key="c0"/> + <column not-null="false" unique="false" name="`CLM_EXT_NBR`" unique-key="c0"/> + </key-many-to-one> + <key-property name="claimLineNumber" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLMLN_NBR`" unique-key="c0"/> + </key-property> + </composite-id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="claimLineBilledAmount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`CLMLN_BILL_AMT`"/> + </property> + <property name="serviceCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SVC_CD`"/> + </property> + <property name="claimLineStatus" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLMLN_STATUS`" length="2"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ClaimAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ClaimAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..939bc023d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ClaimAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,71 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimImpl" entity-name="Claim" abstract="false" lazy="false" discriminator-value="Claim" table="`PCLM_NPRC_CLM`"> + <meta attribute="eclassName" inherit="false">Claim</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <composite-id name="claimCompositeKey" class="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimCompositeKeyImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">ClaimCompositeKey</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <key-property name="claimNumber" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_NBR`" unique-key="c0"/> + </key-property> + <key-property name="claimExtensionNumber" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_EXT_NBR`" unique-key="c0"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PCLM_NPRC_CLMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="billingName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BILLING_NAME`" length="50"/> + </property> + <property name="claimGroupVSPId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_GRP_VSP_ID`" length="3"/> + </property> + <property name="claimStatus" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLM_STATUS`" length="2"/> + </property> + <bag name="claimLine" inverse="true" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CLAIM_CLAIMLINE"> + <column name="`CLM_NBR`" unique="false"/> + <column name="`CLM_EXT_NBR`" unique="false"/> + </key> + <one-to-many entity-name="ClaimLine"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimLineImpl" entity-name="ClaimLine" abstract="false" lazy="false" discriminator-value="ClaimLine" table="`PCLM_NPRC_CLMLN`"> + <meta attribute="eclassName" inherit="false">ClaimLine</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <composite-id name="claimLineCompositeKey" class="org.eclipse.emf.teneo.samples.emf.sample.claim.impl.ClaimLineCompositeKeyImpl" access="org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler"> + <meta attribute="eclassName" inherit="false">ClaimLineCompositeKey</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/claim</meta> + <key-many-to-one name="claim" entity-name="Claim" foreign-key="CLAIMLINECOMPOSITEKEY_CLAIM" lazy="false"> + <column not-null="false" unique="false" name="`CLM_NBR`" unique-key="c0"/> + <column not-null="false" unique="false" name="`CLM_EXT_NBR`" unique-key="c0"/> + </key-many-to-one> + <key-property name="claimLineNumber" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLMLN_NBR`" unique-key="c0"/> + </key-property> + </composite-id> + <discriminator type="string"> + <column name="`DTYPE`" index="PCLM_NPRC_CLMLNDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="claimLineBilledAmount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`CLMLN_BILL_AMT`"/> + </property> + <property name="serviceCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SVC_CD`"/> + </property> + <property name="claimLineStatus" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CLMLN_STATUS`" length="2"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/FleetAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/FleetAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2d5444686 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/FleetAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,422 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="Vehicle" abstract="false" lazy="false" table="`VEHICLE`"> + <meta attribute="eclassName" inherit="false">Vehicle</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="brand" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BRAND`"/> + </property> + <property name="model" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MODEL`"/> + </property> + <property name="make" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAKE`"/> + </property> + <property name="color" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLOR`"/> + </property> + <property name="plate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PLATE`"/> + </property> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="year" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`YEAR`"/> + </property> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`LENGTH`"/> + </property> + <list name="availableColors" table="`VEHICLE_AVAILABLECOLORS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`VEHICLE_AVAILABLECOLORS_E_ID`" unique="false"/> + </key> + <list-index column="`VEHICLE_AVAILABLECOLORS_IDX`"/> + <element type="java.lang.String"/> + </list> + <many-to-one name="owner" entity-name="Person" lazy="false" cascade="all" foreign-key="VEHICLE_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PERSON_OWNER_E_ID`"/> + </many-to-one> + <list name="manufacturedAt" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="VEHICLE_MANUFACTUREDAT"> + <column name="`VEHICLE_MANUFACTUREDAT_E_ID`" unique="false"/> + </key> + <list-index column="`VEHICLE_MANUFACTUREDAT_IDX`"/> + <one-to-many entity-name="ManufacturingPlant"/> + </list> + <many-to-one name="tireSpec" entity-name="Tire" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VEHICLE_TIRESPEC" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TIRE_TIRESPEC_E_ID`"/> + </many-to-one> + </class> + <class entity-name="Temporal" abstract="false" lazy="false" table="`TEMPORAL`"> + <meta attribute="eclassName" inherit="false">Temporal</meta> + <meta attribute="epackage" inherit="false">http:///temporal.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="date" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`DATE`"/> + </property> + <array name="touchedAttributes" table="`TEMPORAL_TOUCHEDATTRIBUTES`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TEMPORAL_TOUCHEDATTRIBUTES_E_ID`" unique="false"/> + </key> + <list-index column="`TEMPORAL_TOUCHEDATTRIBUTES_IDX`"/> + <element type="byte"/> + </array> + <property name="continuity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`CONTINUITY`"/> + </property> + <many-to-one name="versionHolder" entity-name="VersionHolder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TEMPORAL_VERSIONHOLDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TEMPORAL_VERSIONHOLDER_E_ID`"/> + </many-to-one> + <many-to-one name="versionHolderContainment" entity-name="VersionHolder" lazy="false" cascade="all" foreign-key="TEMPORAL_VERSIONHOLDERCONTAINMENT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VERSIONHOLDER_VERSIONHOLDERCONTAINMENT_E_ID`"/> + </many-to-one> + </class> + <joined-subclass entity-name="Person" abstract="false" lazy="false" extends="Temporal" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`TEMPORAL_E_ID`"/> + </key> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="employed" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`EMPLOYED`"/> + </property> + <list name="addresses" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_ADDRESSES"> + <column name="`PERSON_ADDRESSES_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_ADDRESSES_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="ownedVehicles" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PERSON_OWNEDVEHICLES"> + <column name="`PERSON_OWNEDVEHICLES_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_OWNEDVEHICLES_IDX`"/> + <one-to-many entity-name="VehicleInfo"/> + </list> + <many-to-one name="birthAddress" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_BIRTHADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_BIRTHADDRESS_E_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass entity-name="Address" abstract="false" lazy="false" extends="Temporal" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`TEMPORAL_E_ID`"/> + </key> + <property name="streetName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STREETNAME`"/> + </property> + <property name="streetNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STREETNUMBER`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CITY`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRY`"/> + </property> + </joined-subclass> + <class entity-name="VehicleInfo" abstract="false" lazy="false" table="`VEHICLEINFO`"> + <meta attribute="eclassName" inherit="false">VehicleInfo</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="acquisitionDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`ACQUISITIONDATE`"/> + </property> + <many-to-one name="vehicle" entity-name="Vehicle" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VEHICLEINFO_VEHICLE" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`VEHICLE_VEHICLE_E_ID`"/> + </many-to-one> + </class> + <class entity-name="ManufacturingPlant" abstract="false" lazy="false" table="`MANUFACTURINGPLANT`"> + <meta attribute="eclassName" inherit="false">ManufacturingPlant</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANUFACTURINGPLANT_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <many-to-one name="transportFleet" entity-name="Fleet" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANUFACTURINGPLANT_TRANSPORTFLEET" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FLEET_TRANSPORTFLEET_E_ID`"/> + </many-to-one> + </class> + <joined-subclass entity-name="Fleet" abstract="false" lazy="false" extends="Temporal" table="`FLEET`"> + <meta attribute="eclassName" inherit="false">Fleet</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`TEMPORAL_E_ID`"/> + </key> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <list name="vehicles" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="FLEET_VEHICLES"> + <column name="`FLEET_VEHICLES_E_ID`" unique="false"/> + </key> + <list-index column="`FLEET_VEHICLES_IDX`"/> + <one-to-many entity-name="Vehicle"/> + </list> + <list name="vehicleInformation" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FLEET_VEHICLEINFORMATION"> + <column name="`FLEET_VEHICLEINFORMATION_E_ID`" unique="false"/> + </key> + <list-index column="`FLEET_VEHICLEINFORMATION_IDX`"/> + <one-to-many entity-name="VehicleInfo"/> + </list> + <many-to-one name="serviceGarage" entity-name="Garage" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FLEET_SERVICEGARAGE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`FLEET_SERVICEGARAGE_E_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass entity-name="Garage" abstract="false" lazy="false" extends="Temporal" table="`GARAGE`"> + <meta attribute="eclassName" inherit="false">Garage</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`TEMPORAL_E_ID`"/> + </key> + <list name="vehicles" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="GARAGE_VEHICLES"> + <column name="`GARAGE_VEHICLES_E_ID`" unique="false"/> + </key> + <list-index column="`GARAGE_VEHICLES_IDX`"/> + <one-to-many entity-name="Vehicle"/> + </list> + <many-to-one name="customerShuttles" entity-name="Fleet" lazy="false" cascade="all" foreign-key="GARAGE_CUSTOMERSHUTTLES" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FLEET_CUSTOMERSHUTTLES_E_ID`"/> + </many-to-one> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="GARAGE_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <list name="fleetsUsingGarage" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`FLEET_SERVICEGARAGE_E_ID`" unique="false"/> + </key> + <list-index column="`GARAGE_FLEETSUSINGGARAGE_IDX`"/> + <one-to-many entity-name="Fleet"/> + </list> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </joined-subclass> + <class entity-name="Tire" abstract="false" lazy="false" table="`TIRE`"> + <meta attribute="eclassName" inherit="false">Tire</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="radius" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`RADIUS`"/> + </property> + <property name="width" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`WIDTH`"/> + </property> + <property name="profile" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PROFILE`"/> + </property> + <property name="make" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAKE`"/> + </property> + <property name="model" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MODEL`"/> + </property> + </class> + <joined-subclass entity-name="Car" abstract="false" lazy="false" extends="Vehicle" table="`CAR`"> + <meta attribute="eclassName" inherit="false">Car</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`PASSENGERVEHICLE_E_ID`"/> + </key> + <property name="passengerName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PASSENGERNAME`"/> + </property> + <property name="date" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`DATE`"/> + </property> + <array name="touchedAttributes" table="`CAR_TOUCHEDATTRIBUTES`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CAR_TOUCHEDATTRIBUTES_E_ID`" unique="false"/> + </key> + <list-index column="`CAR_TOUCHEDATTRIBUTES_IDX`"/> + <element type="byte"/> + </array> + <property name="continuity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`CONTINUITY`"/> + </property> + <many-to-one name="versionHolder" entity-name="VersionHolder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TEMPORAL_VERSIONHOLDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`CAR_VERSIONHOLDER_E_ID`"/> + </many-to-one> + <many-to-one name="versionHolderContainment" entity-name="VersionHolder" lazy="false" cascade="all" foreign-key="TEMPORAL_VERSIONHOLDERCONTAINMENT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VERSIONHOLDER_VERSIONHOLDERCONTAINMENT_E_ID`"/> + </many-to-one> + <property name="numPassengers" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NUMPASSENGERS`"/> + </property> + <property name="numTires" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NUMTIRES`"/> + </property> + <list name="tires" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CAR_TIRES"> + <column name="`CAR_TIRES_E_ID`" unique="false"/> + </key> + <list-index column="`CAR_TIRES_IDX`"/> + <one-to-many entity-name="Tire"/> + </list> + </joined-subclass> + <joined-subclass entity-name="Hybrid" abstract="false" lazy="false" extends="Car" table="`HYBRID`"> + <meta attribute="eclassName" inherit="false">Hybrid</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`CAR_E_ID`"/> + </key> + <property name="hasRechargePlug" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`HASRECHARGEPLUG`"/> + </property> + <property name="batteryLife" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`BATTERYLIFE`"/> + </property> + </joined-subclass> + <class name="fleet.PassengerVehicle" entity-name="PassengerVehicle" abstract="true" lazy="false" table="`PASSENGERVEHICLE`"> + <meta attribute="eclassName" inherit="false">PassengerVehicle</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="passengerName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PASSENGERNAME`"/> + </property> + </class> + <joined-subclass entity-name="EngineFactory" abstract="false" lazy="false" extends="ManufacturingPlant" table="`ENGINEFACTORY`"> + <meta attribute="eclassName" inherit="false">EngineFactory</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`MANUFACTURINGPLANT_E_ID`"/> + </key> + <property name="makesDieselEngines" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MAKESDIESELENGINES`"/> + </property> + <list name="brands" table="`ENGINEFACTORY_BRANDS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ENGINEFACTORY_BRANDS_E_ID`" unique="false"/> + </key> + <list-index column="`ENGINEFACTORY_BRANDS_IDX`"/> + <element type="java.lang.String"/> + </list> + </joined-subclass> + <joined-subclass entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <key> + <column name="`ADDRESS_E_ID`"/> + </key> + <property name="zipCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ZIPCODE`"/> + </property> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + </joined-subclass> + <class entity-name="Vin" abstract="false" lazy="false" table="`VIN`"> + <meta attribute="eclassName" inherit="false">Vin</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="installationDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`INSTALLATIONDATE`"/> + </property> + <many-to-one name="vehicle" entity-name="Vehicle" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VIN_VEHICLE" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`VEHICLE_VEHICLE_E_ID`"/> + </many-to-one> + </class> + <class entity-name="TransportationDevice" abstract="false" lazy="false" table="`TRANSPORTATIONDEVICE`"> + <meta attribute="eclassName" inherit="false">TransportationDevice</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="manufacturedBy" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MANUFACTUREDBY`"/> + </property> + <property name="year" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`YEAR`"/> + </property> + </class> + <class entity-name="VersionHolder" abstract="false" lazy="false" table="`VERSIONHOLDER`"> + <meta attribute="eclassName" inherit="false">VersionHolder</meta> + <meta attribute="epackage" inherit="false">http:///temporal.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="versions" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TEMPORAL_VERSIONHOLDER_E_ID`" unique="false"/> + </key> + <list-index column="`VERSIONHOLDER_VERSIONS_IDX`"/> + <one-to-many entity-name="Temporal"/> + </list> + <property name="indexOfContinuity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`INDEXOFCONTINUITY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/FleetAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/FleetAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5c8377fe0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/FleetAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,425 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class entity-name="Vehicle" abstract="false" lazy="false" discriminator-value="Vehicle" table="`VEHICLE`"> + <meta attribute="eclassName" inherit="false">Vehicle</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="VEHICLEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="brand" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BRAND`"/> + </property> + <property name="model" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MODEL`"/> + </property> + <property name="make" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAKE`"/> + </property> + <property name="color" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLOR`"/> + </property> + <property name="plate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PLATE`"/> + </property> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="year" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`YEAR`"/> + </property> + <property name="length" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`LENGTH`"/> + </property> + <list name="availableColors" table="`VEHICLE_AVAILABLECOLORS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`VEHICLE_AVAILABLECOLORS_E_ID`" unique="false"/> + </key> + <list-index column="`VEHICLE_AVAILABLECOLORS_IDX`"/> + <element type="java.lang.String"/> + </list> + <many-to-one name="owner" entity-name="Person" lazy="false" cascade="all" foreign-key="VEHICLE_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PERSON_OWNER_E_ID`"/> + </many-to-one> + <list name="manufacturedAt" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="VEHICLE_MANUFACTUREDAT"> + <column name="`VEHICLE_MANUFACTUREDAT_E_ID`" unique="false"/> + </key> + <list-index column="`VEHICLE_MANUFACTUREDAT_IDX`"/> + <one-to-many entity-name="ManufacturingPlant"/> + </list> + <many-to-one name="tireSpec" entity-name="Tire" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VEHICLE_TIRESPEC" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TIRE_TIRESPEC_E_ID`"/> + </many-to-one> + </class> + <class entity-name="Temporal" abstract="false" lazy="false" discriminator-value="Temporal" table="`TEMPORAL`"> + <meta attribute="eclassName" inherit="false">Temporal</meta> + <meta attribute="epackage" inherit="false">http:///temporal.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TEMPORALDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="date" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`DATE`"/> + </property> + <array name="touchedAttributes" table="`TEMPORAL_TOUCHEDATTRIBUTES`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TEMPORAL_TOUCHEDATTRIBUTES_E_ID`" unique="false"/> + </key> + <list-index column="`TEMPORAL_TOUCHEDATTRIBUTES_IDX`"/> + <element type="byte"/> + </array> + <property name="continuity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`CONTINUITY`"/> + </property> + <many-to-one name="versionHolder" entity-name="VersionHolder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TEMPORAL_VERSIONHOLDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TEMPORAL_VERSIONHOLDER_E_ID`"/> + </many-to-one> + <many-to-one name="versionHolderContainment" entity-name="VersionHolder" lazy="false" cascade="all" foreign-key="TEMPORAL_VERSIONHOLDERCONTAINMENT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VERSIONHOLDER_VERSIONHOLDERCONTAINMENT_E_ID`"/> + </many-to-one> + </class> + <subclass entity-name="Person" abstract="false" lazy="false" extends="Temporal" discriminator-value="Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="employed" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`EMPLOYED`"/> + </property> + <list name="addresses" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_ADDRESSES"> + <column name="`PERSON_ADDRESSES_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_ADDRESSES_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="ownedVehicles" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PERSON_OWNEDVEHICLES"> + <column name="`PERSON_OWNEDVEHICLES_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_OWNEDVEHICLES_IDX`"/> + <one-to-many entity-name="VehicleInfo"/> + </list> + <many-to-one name="birthAddress" entity-name="Address" lazy="false" cascade="all" foreign-key="PERSON_BIRTHADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_BIRTHADDRESS_E_ID`"/> + </many-to-one> + </subclass> + <subclass entity-name="Address" abstract="false" lazy="false" extends="Temporal" discriminator-value="Address"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="streetName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STREETNAME`"/> + </property> + <property name="streetNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STREETNUMBER`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CITY`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRY`"/> + </property> + </subclass> + <class entity-name="VehicleInfo" abstract="false" lazy="false" discriminator-value="VehicleInfo" table="`VEHICLEINFO`"> + <meta attribute="eclassName" inherit="false">VehicleInfo</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="VEHICLEINFODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="acquisitionDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`ACQUISITIONDATE`"/> + </property> + <many-to-one name="vehicle" entity-name="Vehicle" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VEHICLEINFO_VEHICLE" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`VEHICLE_VEHICLE_E_ID`"/> + </many-to-one> + </class> + <class entity-name="ManufacturingPlant" abstract="false" lazy="false" discriminator-value="ManufacturingPlant" table="`MANUFACTURINGPLANT`"> + <meta attribute="eclassName" inherit="false">ManufacturingPlant</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANUFACTURINGPLANTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANUFACTURINGPLANT_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <many-to-one name="transportFleet" entity-name="Fleet" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANUFACTURINGPLANT_TRANSPORTFLEET" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FLEET_TRANSPORTFLEET_E_ID`"/> + </many-to-one> + </class> + <subclass entity-name="Fleet" abstract="false" lazy="false" extends="Temporal" discriminator-value="Fleet"> + <meta attribute="eclassName" inherit="false">Fleet</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <list name="vehicles" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="FLEET_VEHICLES"> + <column name="`FLEET_VEHICLES_E_ID`" unique="false"/> + </key> + <list-index column="`FLEET_VEHICLES_IDX`"/> + <one-to-many entity-name="Vehicle"/> + </list> + <list name="vehicleInformation" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FLEET_VEHICLEINFORMATION"> + <column name="`FLEET_VEHICLEINFORMATION_E_ID`" unique="false"/> + </key> + <list-index column="`FLEET_VEHICLEINFORMATION_IDX`"/> + <one-to-many entity-name="VehicleInfo"/> + </list> + <many-to-one name="serviceGarage" entity-name="Garage" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FLEET_SERVICEGARAGE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`FLEET_SERVICEGARAGE_E_ID`"/> + </many-to-one> + </subclass> + <subclass entity-name="Garage" abstract="false" lazy="false" extends="Temporal" discriminator-value="Garage"> + <meta attribute="eclassName" inherit="false">Garage</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <list name="vehicles" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="GARAGE_VEHICLES"> + <column name="`GARAGE_VEHICLES_E_ID`" unique="false"/> + </key> + <list-index column="`GARAGE_VEHICLES_IDX`"/> + <one-to-many entity-name="Vehicle"/> + </list> + <many-to-one name="customerShuttles" entity-name="Fleet" lazy="false" cascade="all" foreign-key="GARAGE_CUSTOMERSHUTTLES" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FLEET_CUSTOMERSHUTTLES_E_ID`"/> + </many-to-one> + <many-to-one name="address" entity-name="Address" lazy="false" cascade="all" foreign-key="GARAGE_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_ADDRESS_E_ID`"/> + </many-to-one> + <list name="fleetsUsingGarage" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`FLEET_SERVICEGARAGE_E_ID`" unique="false"/> + </key> + <list-index column="`GARAGE_FLEETSUSINGGARAGE_IDX`"/> + <one-to-many entity-name="Fleet"/> + </list> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </subclass> + <class entity-name="Tire" abstract="false" lazy="false" discriminator-value="Tire" table="`TIRE`"> + <meta attribute="eclassName" inherit="false">Tire</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TIREDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="radius" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`RADIUS`"/> + </property> + <property name="width" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`WIDTH`"/> + </property> + <property name="profile" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PROFILE`"/> + </property> + <property name="make" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAKE`"/> + </property> + <property name="model" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MODEL`"/> + </property> + </class> + <subclass entity-name="Car" abstract="false" lazy="false" extends="Vehicle" discriminator-value="Car"> + <meta attribute="eclassName" inherit="false">Car</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="passengerName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PASSENGERNAME`"/> + </property> + <property name="date" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`DATE`"/> + </property> + <array name="touchedAttributes" table="`CAR_TOUCHEDATTRIBUTES`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CAR_TOUCHEDATTRIBUTES_E_ID`" unique="false"/> + </key> + <list-index column="`CAR_TOUCHEDATTRIBUTES_IDX`"/> + <element type="byte"/> + </array> + <property name="continuity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`CONTINUITY`"/> + </property> + <many-to-one name="versionHolder" entity-name="VersionHolder" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TEMPORAL_VERSIONHOLDER" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`CAR_VERSIONHOLDER_E_ID`"/> + </many-to-one> + <many-to-one name="versionHolderContainment" entity-name="VersionHolder" lazy="false" cascade="all" foreign-key="TEMPORAL_VERSIONHOLDERCONTAINMENT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VERSIONHOLDER_VERSIONHOLDERCONTAINMENT_E_ID`"/> + </many-to-one> + <property name="numPassengers" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NUMPASSENGERS`"/> + </property> + <property name="numTires" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NUMTIRES`"/> + </property> + <list name="tires" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="CAR_TIRES"> + <column name="`CAR_TIRES_E_ID`" unique="false"/> + </key> + <list-index column="`CAR_TIRES_IDX`"/> + <one-to-many entity-name="Tire"/> + </list> + </subclass> + <subclass entity-name="Hybrid" abstract="false" lazy="false" extends="Car" discriminator-value="Hybrid"> + <meta attribute="eclassName" inherit="false">Hybrid</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="hasRechargePlug" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`HASRECHARGEPLUG`"/> + </property> + <property name="batteryLife" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`BATTERYLIFE`"/> + </property> + </subclass> + <class name="fleet.PassengerVehicle" entity-name="PassengerVehicle" abstract="true" lazy="false" discriminator-value="PassengerVehicle" table="`PASSENGERVEHICLE`"> + <meta attribute="eclassName" inherit="false">PassengerVehicle</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PASSENGERVEHICLEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="passengerName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PASSENGERNAME`"/> + </property> + </class> + <subclass entity-name="EngineFactory" abstract="false" lazy="false" extends="ManufacturingPlant" discriminator-value="EngineFactory"> + <meta attribute="eclassName" inherit="false">EngineFactory</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="makesDieselEngines" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MAKESDIESELENGINES`"/> + </property> + <list name="brands" table="`ENGINEFACTORY_BRANDS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ENGINEFACTORY_BRANDS_E_ID`" unique="false"/> + </key> + <list-index column="`ENGINEFACTORY_BRANDS_IDX`"/> + <element type="java.lang.String"/> + </list> + </subclass> + <subclass entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <property name="zipCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ZIPCODE`"/> + </property> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + </subclass> + <class entity-name="Vin" abstract="false" lazy="false" discriminator-value="Vin" table="`VIN`"> + <meta attribute="eclassName" inherit="false">Vin</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="VINDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="installationDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`INSTALLATIONDATE`"/> + </property> + <many-to-one name="vehicle" entity-name="Vehicle" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VIN_VEHICLE" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`VEHICLE_VEHICLE_E_ID`"/> + </many-to-one> + </class> + <class entity-name="TransportationDevice" abstract="false" lazy="false" discriminator-value="TransportationDevice" table="`TRANSPORTATIONDEVICE`"> + <meta attribute="eclassName" inherit="false">TransportationDevice</meta> + <meta attribute="epackage" inherit="false">http:///fleet.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TRANSPORTATIONDEVICEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="manufacturedBy" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MANUFACTUREDBY`"/> + </property> + <property name="year" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`YEAR`"/> + </property> + </class> + <class entity-name="VersionHolder" abstract="false" lazy="false" discriminator-value="VersionHolder" table="`VERSIONHOLDER`"> + <meta attribute="eclassName" inherit="false">VersionHolder</meta> + <meta attribute="epackage" inherit="false">http:///temporal.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="VERSIONHOLDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="versions" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TEMPORAL_VERSIONHOLDER_E_ID`" unique="false"/> + </key> + <list-index column="`VERSIONHOLDER_VERSIONS_IDX`"/> + <one-to-many entity-name="Temporal"/> + </list> + <property name="indexOfContinuity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`INDEXOFCONTINUITY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ForumAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ForumAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3f8fd2dd3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ForumAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,117 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="forum.TopicCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</param> + <param name="edatatype">TopicCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.ForumImpl" entity-name="Forum" abstract="false" lazy="false" table="`FORUM`"> + <meta attribute="eclassName" inherit="false">Forum</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="members" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FORUM_MEMBERS"> + <column name="`FORUM_MEMBERS_E_ID`" unique="false"/> + </key> + <list-index column="`FORUM_MEMBERS_IDX`"/> + <one-to-many entity-name="Member"/> + </list> + <list name="topics" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FORUM_TOPICS"> + <column name="`FORUM_TOPICS_E_ID`" unique="false"/> + </key> + <list-index column="`FORUM_TOPICS_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.MemberImpl" entity-name="Member" abstract="false" lazy="false" table="`MEMBER`"> + <meta attribute="eclassName" inherit="false">Member</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="nickname" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NICKNAME`"/> + </property> + <list name="posts" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`POST_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`MEMBER_POSTS_IDX`"/> + <one-to-many entity-name="Post"/> + </list> + <list name="created" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TOPIC_CREATOR_E_ID`" unique="false"/> + </key> + <list-index column="`MEMBER_CREATED_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.PostImpl" entity-name="Post" abstract="false" lazy="false" table="`POST`"> + <meta attribute="eclassName" inherit="false">Post</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="comment" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`COMMENT`"/> + </property> + <many-to-one name="author" entity-name="Member" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="POST_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`POST_AUTHOR_E_ID`"/> + </many-to-one> + <many-to-one name="topic" entity-name="Topic" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="POST_TOPIC" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`POST_TOPIC_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.TopicImpl" entity-name="Topic" abstract="false" lazy="false" table="`TOPIC`"> + <meta attribute="eclassName" inherit="false">Topic</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.forum.TopicCategory</param> + <param name="eclassifier">TopicCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</param> + </type> + </property> + <many-to-one name="creator" entity-name="Member" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TOPIC_CREATOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TOPIC_CREATOR_E_ID`"/> + </many-to-one> + <list name="posts" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`POST_TOPIC_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_POSTS_IDX`"/> + <one-to-many entity-name="Post"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ForumAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ForumAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..341bc04d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ForumAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,129 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="forum.TopicCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</param> + <param name="edatatype">TopicCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.ForumImpl" entity-name="Forum" abstract="false" lazy="false" discriminator-value="Forum" table="`FORUM`"> + <meta attribute="eclassName" inherit="false">Forum</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FORUMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="members" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FORUM_MEMBERS"> + <column name="`FORUM_MEMBERS_E_ID`" unique="false"/> + </key> + <list-index column="`FORUM_MEMBERS_IDX`"/> + <one-to-many entity-name="Member"/> + </list> + <list name="topics" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FORUM_TOPICS"> + <column name="`FORUM_TOPICS_E_ID`" unique="false"/> + </key> + <list-index column="`FORUM_TOPICS_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.MemberImpl" entity-name="Member" abstract="false" lazy="false" discriminator-value="Member" table="`MEMBER`"> + <meta attribute="eclassName" inherit="false">Member</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MEMBERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="nickname" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NICKNAME`"/> + </property> + <list name="posts" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`POST_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`MEMBER_POSTS_IDX`"/> + <one-to-many entity-name="Post"/> + </list> + <list name="created" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`TOPIC_CREATOR_E_ID`" unique="false"/> + </key> + <list-index column="`MEMBER_CREATED_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.PostImpl" entity-name="Post" abstract="false" lazy="false" discriminator-value="Post" table="`POST`"> + <meta attribute="eclassName" inherit="false">Post</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="POSTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="comment" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`COMMENT`"/> + </property> + <many-to-one name="author" entity-name="Member" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="POST_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`POST_AUTHOR_E_ID`"/> + </many-to-one> + <many-to-one name="topic" entity-name="Topic" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="POST_TOPIC" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`POST_TOPIC_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.forum.impl.TopicImpl" entity-name="Topic" abstract="false" lazy="false" discriminator-value="Topic" table="`TOPIC`"> + <meta attribute="eclassName" inherit="false">Topic</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TOPICDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.forum.TopicCategory</param> + <param name="eclassifier">TopicCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/forum</param> + </type> + </property> + <many-to-one name="creator" entity-name="Member" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TOPIC_CREATOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`TOPIC_CREATOR_E_ID`"/> + </many-to-one> + <list name="posts" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`POST_TOPIC_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_POSTS_IDX`"/> + <one-to-many entity-name="Post"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/InventoryAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/InventoryAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..45ad6dcc7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/InventoryAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,54 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.inv.impl.PTypeImpl" entity-name="PType" abstract="false" lazy="false" table="`PTYPE`"> + <meta attribute="eclassName" inherit="false">PType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/inv</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="base" entity-name="PType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PTYPE_BASE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PTYPE_BASE_ID`"/> + </many-to-one> + <bag name="subTypes" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`PTYPE_BASE_ID`" unique="false"/> + </key> + <one-to-many entity-name="PType"/> + </bag> + <bag name="subNOTypes" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PTYPE_SUBNOTYPES"> + <column name="`PTYPE_SUBNOTYPES_ID`" unique="false"/> + </key> + <one-to-many entity-name="PType"/> + </bag> + <bag name="infoReferences" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PTYPE_INFOREFERENCES"> + <column name="`PTYPE_INFOREFERENCES_ID`" unique="false"/> + </key> + <one-to-many entity-name="PDeclaration"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.inv.impl.PDeclarationImpl" entity-name="PDeclaration" abstract="false" lazy="false" table="`PDECLARATION`"> + <meta attribute="eclassName" inherit="false">PDeclaration</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/inv</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/InventoryAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/InventoryAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..ec975742f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/InventoryAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,60 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.inv.impl.PTypeImpl" entity-name="PType" abstract="false" lazy="false" discriminator-value="PType" table="`PTYPE`"> + <meta attribute="eclassName" inherit="false">PType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/inv</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="base" entity-name="PType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PTYPE_BASE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PTYPE_BASE_ID`"/> + </many-to-one> + <bag name="subTypes" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`PTYPE_BASE_ID`" unique="false"/> + </key> + <one-to-many entity-name="PType"/> + </bag> + <bag name="subNOTypes" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PTYPE_SUBNOTYPES"> + <column name="`PTYPE_SUBNOTYPES_ID`" unique="false"/> + </key> + <one-to-many entity-name="PType"/> + </bag> + <bag name="infoReferences" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="PTYPE_INFOREFERENCES"> + <column name="`PTYPE_INFOREFERENCES_ID`" unique="false"/> + </key> + <one-to-many entity-name="PDeclaration"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.inv.impl.PDeclarationImpl" entity-name="PDeclaration" abstract="false" lazy="false" discriminator-value="PDeclaration" table="`PDECLARATION`"> + <meta attribute="eclassName" inherit="false">PDeclaration</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/inv</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PDECLARATIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c96bc2a1e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,148 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.BookDefinitionImpl" entity-name="BookDefinition" abstract="true" lazy="false" table="`BOOKDEFINITION`"> + <meta attribute="eclassName" inherit="false">BookDefinition</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id name="uniqueName" type="java.lang.String"> + <column not-null="true" unique="false" name="`UNIQUENAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="location" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LOCATION`"/> + </property> + </class> + <joined-subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.AdultBooksImpl" entity-name="AdultBooks" abstract="false" lazy="false" extends="BookDefinition" table="`ADULTBOOKS`"> + <meta attribute="eclassName" inherit="false">AdultBooks</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <key> + <column name="`BOOKDEFINITION_UNIQUENAME`"/> + </key> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="checkedout" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CHECKEDOUT`"/> + </property> + <property name="userid" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`USERID`"/> + </property> + </joined-subclass> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.ResourceLinkImpl" entity-name="ResourceLink" abstract="true" lazy="false" table="`RESOURCELINK`"> + <meta attribute="eclassName" inherit="false">ResourceLink</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <joined-subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.BookDefinitionResourceLinkImpl" entity-name="BookDefinitionResourceLink" abstract="false" lazy="false" extends="ResourceLink" table="`BOOKDEFINITIONRESOURCELINK`"> + <meta attribute="eclassName" inherit="false">BookDefinitionResourceLink</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <key> + <column name="`RESOURCELINK_E_ID`"/> + </key> + <property name="bookSubject" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BOOKSUBJECT`"/> + </property> + </joined-subclass> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.BooksInLibImpl" entity-name="BooksInLib" abstract="false" lazy="false" table="`BOOKSINLIB`"> + <meta attribute="eclassName" inherit="false">BooksInLib</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="library" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKSINLIB_LIBRARY"> + <column name="`BOOKSINLIB_LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`BOOKSINLIB_LIBRARY_IDX`"/> + <one-to-many entity-name="Library"/> + </list> + </class> + <joined-subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.ChildrenBooksImpl" entity-name="ChildrenBooks" abstract="false" lazy="false" extends="BookDefinition" table="`CHILDRENBOOKS`"> + <meta attribute="eclassName" inherit="false">ChildrenBooks</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <key> + <column name="`BOOKDEFINITION_UNIQUENAME`"/> + </key> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="cartoon" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CARTOON`"/> + </property> + <property name="popup" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POPUP`"/> + </property> + <many-to-one name="publisherDefinitionRef" entity-name="PublisherDefinition" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CHILDRENBOOKS_PUBLISHERDEFINITIONREF" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`PUBLISHERDEFINITION_PUBLISHERDEFINITIONREF_UNIQUENAME`"/> + </many-to-one> + </joined-subclass> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id name="uniqueName" type="java.lang.String"> + <column not-null="true" unique="false" name="`UNIQUENAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="library" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_LIBRARY"> + <column name="`LIBRARY_LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_LIBRARY_IDX`"/> + <one-to-many entity-name="Library"/> + </list> + <list name="abstractBookDefinitionGroup" table="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP_IDX`"/> + <one-to-many entity-name="Library_abstractBookDefinitionGroup"/> + </list> + </class> + <class entity-name="Library_abstractBookDefinitionGroup" lazy="false" table="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP`"> + <meta attribute="featureMap" inherit="false">Library</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="abstractBookDefinition" entity-name="BookDefinition" lazy="false" cascade="all" foreign-key="LIBRARY_ABSTRACTBOOKDEFINITION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ABSTRACTBOOKDEFINITIONGROUP_BOOKDEFINITION_ABSTRACTBOOKDEFINITION_UNIQUENAME`"/> + </many-to-one> + </class> + <joined-subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.PublisherDefinitionImpl" entity-name="PublisherDefinition" abstract="false" lazy="false" extends="BookDefinition" table="`PUBLISHERDEFINITION`"> + <meta attribute="eclassName" inherit="false">PublisherDefinition</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <key> + <column name="`BOOKDEFINITION_UNIQUENAME`"/> + </key> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <many-to-one name="resourceLink" entity-name="BookDefinitionResourceLink" lazy="false" cascade="all" foreign-key="PUBLISHERDEFINITION_RESOURCELINK" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`BOOKDEFINITIONRESOURCELINK_RESOURCELINK_E_ID`"/> + </many-to-one> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a0d7d576b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,148 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.BookDefinitionImpl" entity-name="BookDefinition" abstract="true" lazy="false" discriminator-value="BookDefinition" table="`BOOKDEFINITION`"> + <meta attribute="eclassName" inherit="false">BookDefinition</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id name="uniqueName" type="java.lang.String"> + <column not-null="true" unique="false" name="`UNIQUENAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDEFINITIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="location" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LOCATION`"/> + </property> + </class> + <subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.AdultBooksImpl" entity-name="AdultBooks" abstract="false" lazy="false" extends="BookDefinition" discriminator-value="AdultBooks"> + <meta attribute="eclassName" inherit="false">AdultBooks</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="checkedout" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CHECKEDOUT`"/> + </property> + <property name="userid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`USERID`"/> + </property> + </subclass> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.ResourceLinkImpl" entity-name="ResourceLink" abstract="true" lazy="false" discriminator-value="ResourceLink" table="`RESOURCELINK`"> + <meta attribute="eclassName" inherit="false">ResourceLink</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RESOURCELINKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.BookDefinitionResourceLinkImpl" entity-name="BookDefinitionResourceLink" abstract="false" lazy="false" extends="ResourceLink" discriminator-value="BookDefinitionResourceLink"> + <meta attribute="eclassName" inherit="false">BookDefinitionResourceLink</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <property name="bookSubject" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BOOKSUBJECT`"/> + </property> + </subclass> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.BooksInLibImpl" entity-name="BooksInLib" abstract="false" lazy="false" discriminator-value="BooksInLib" table="`BOOKSINLIB`"> + <meta attribute="eclassName" inherit="false">BooksInLib</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKSINLIBDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="library" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKSINLIB_LIBRARY"> + <column name="`BOOKSINLIB_LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`BOOKSINLIB_LIBRARY_IDX`"/> + <one-to-many entity-name="Library"/> + </list> + </class> + <subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.ChildrenBooksImpl" entity-name="ChildrenBooks" abstract="false" lazy="false" extends="BookDefinition" discriminator-value="ChildrenBooks"> + <meta attribute="eclassName" inherit="false">ChildrenBooks</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <property name="cartoon" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CARTOON`"/> + </property> + <property name="popup" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`POPUP`"/> + </property> + <many-to-one name="publisherDefinitionRef" entity-name="PublisherDefinition" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CHILDRENBOOKS_PUBLISHERDEFINITIONREF" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PUBLISHERDEFINITION_PUBLISHERDEFINITIONREF_UNIQUENAME`"/> + </many-to-one> + </subclass> + <class name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <id name="uniqueName" type="java.lang.String"> + <column not-null="true" unique="false" name="`UNIQUENAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="library" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_LIBRARY"> + <column name="`LIBRARY_LIBRARY_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_LIBRARY_IDX`"/> + <one-to-many entity-name="Library"/> + </list> + <list name="abstractBookDefinitionGroup" table="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP_IDX`"/> + <one-to-many entity-name="Library_abstractBookDefinitionGroup"/> + </list> + </class> + <class entity-name="Library_abstractBookDefinitionGroup" lazy="false" table="`LIBRARY_ABSTRACTBOOKDEFINITIONGROUP`"> + <meta attribute="featureMap" inherit="false">Library</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="abstractBookDefinition" entity-name="BookDefinition" lazy="false" cascade="all" foreign-key="LIBRARY_ABSTRACTBOOKDEFINITION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ABSTRACTBOOKDEFINITIONGROUP_BOOKDEFINITION_ABSTRACTBOOKDEFINITION_UNIQUENAME`"/> + </many-to-one> + </class> + <subclass name="com.ibm.websphere.appserver.schemas._6._0.ibm.portal.test.impl.PublisherDefinitionImpl" entity-name="PublisherDefinition" abstract="false" lazy="false" extends="BookDefinition" discriminator-value="PublisherDefinition"> + <meta attribute="eclassName" inherit="false">PublisherDefinition</meta> + <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsd</meta> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <many-to-one name="resourceLink" entity-name="BookDefinitionResourceLink" lazy="false" cascade="all" foreign-key="PUBLISHERDEFINITION_RESOURCELINK" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOKDEFINITIONRESOURCELINK_RESOURCELINK_E_ID`"/> + </many-to-one> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryCheckNameAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryCheckNameAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ea53602e1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryCheckNameAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BK_ATHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BK_THR_D`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LB_WR_D`" unique="false"/> + </key> + <list-index column="`TST_INDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LBRR_BKS"> + <column name="`LB_BK_D`" unique="false"/> + </key> + <list-index column="`LB_BK_DX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BK_THR_D`" unique="false"/> + </key> + <list-index column="`WR_BK_DX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryCheckNameAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryCheckNameAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..95e3677e4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryCheckNameAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BK_ATHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BK_THR_D`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LB_WR_D`" unique="false"/> + </key> + <list-index column="`TST_INDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LBRR_BKS"> + <column name="`LB_BK_D`" unique="false"/> + </key> + <list-index column="`LB_BK_DX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BK_THR_D`" unique="false"/> + </key> + <list-index column="`WR_BK_DX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryColLengthAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryColLengthAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6da4a15a8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryColLengthAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,89 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEG`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BO_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRA`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LI_ID`" unique="false"/> + </key> + <list-index column="`TEST_`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LI_ID`" unique="false"/> + </key> + <list-index column="`L_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITE`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BO_ID`" unique="false"/> + </key> + <list-index column="`W_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryColLengthAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryColLengthAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..98a710e0d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryColLengthAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,98 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEG`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BO_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRA`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRADTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LI_ID`" unique="false"/> + </key> + <list-index column="`TEST_`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LI_ID`" unique="false"/> + </key> + <list-index column="`L_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITE`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="myID" column="myID" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BO_ID`" unique="false"/> + </key> + <list-index column="`W_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDBothAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDBothAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDBothAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDBothAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDBothAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDBothAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDFeatureIDAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDFeatureIDAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDFeatureIDAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDFeatureIDAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDFeatureIDAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryContainerFeatureIDFeatureIDAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryFKAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryFKAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..a3b29b7a6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryFKAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,91 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`" length="50"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryFKAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryFKAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cd24dd90d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryFKAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,100 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`" length="50"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryGlobalEagerAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryGlobalEagerAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..4cf0e63f8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryGlobalEagerAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryGlobalEagerAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryGlobalEagerAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..eb9dfb4de --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryGlobalEagerAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="false" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryJoinTableNamingAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryJoinTableNamingAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..7635491c4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryJoinTableNamingAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,95 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + <join table="`WRITER_BOOKS`" inverse="true" optional="true"> + <key update="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </key> + <many-to-one name="author" entity-name="Writer" lazy="false" insert="true" update="true" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR"> + <column not-null="false" unique="false" name="`WRITER_E_ID`"/> + </many-to-one> + </join> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Writer"/> + </bag> + <bag name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Book"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="books" table="`WRITER_BOOKS`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`WRITER_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Book" unique="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryJoinTableNamingAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryJoinTableNamingAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5367a6c24 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryJoinTableNamingAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,104 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + <join table="`WRITER_BOOKS`" inverse="true" optional="true"> + <key update="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </key> + <many-to-one name="author" entity-name="Writer" lazy="false" insert="true" update="true" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR"> + <column not-null="false" unique="false" name="`WRITER_E_ID`"/> + </many-to-one> + </join> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Writer"/> + </bag> + <bag name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Book"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="books" table="`WRITER_BOOKS`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`WRITER_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Book" unique="true"> + <column name="`BOOK_TITLE`" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryListAsBagAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryListAsBagAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..229bc8dfc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryListAsBagAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,82 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Writer"/> + </bag> + <bag name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Book"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Book"/> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryListAsBagAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryListAsBagAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..be0f032e0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryListAsBagAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,91 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Writer"/> + </bag> + <bag name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Book"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Book"/> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNonResolvingAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNonResolvingAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNonResolvingAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNonResolvingAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNonResolvingAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNonResolvingAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryQualifyActionHB_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryQualifyActionHB_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e22960d31 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryQualifyActionHB_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="library.Book" abstract="false" lazy="false" table="`LIBRARY_BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="library.Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="LIBRARY_BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="library.Library" abstract="false" lazy="false" table="`LIBRARY_LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="library.Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="library.Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="library.Writer" abstract="false" lazy="false" table="`LIBRARY_WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="library.Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryQualifyActionHB_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryQualifyActionHB_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..04008243e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryQualifyActionHB_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="library.Book" abstract="false" lazy="false" discriminator-value="library.Book" table="`LIBRARY_BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARY_BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="library.Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="LIBRARY_BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="library.Library" abstract="false" lazy="false" discriminator-value="library.Library" table="`LIBRARY_LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARY_LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="library.Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="library.Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="library.Writer" abstract="false" lazy="false" discriminator-value="library.Writer" table="`LIBRARY_WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARY_WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="library.Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceCutPasteAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceCutPasteAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..06d70768a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceCutPasteAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="persist,merge,delete,refresh,save-update,lock"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="persist,merge,delete,refresh,save-update,lock"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceCutPasteAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceCutPasteAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..7bad68c0d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceCutPasteAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="persist,merge,delete,refresh,save-update,lock"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="persist,merge,delete,refresh,save-update,lock"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceVisitTreeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceVisitTreeAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceVisitTreeAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceVisitTreeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceVisitTreeAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryResourceVisitTreeAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibrarySerializationAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibrarySerializationAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibrarySerializationAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibrarySerializationAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibrarySerializationAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibrarySerializationAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryUseMappingFileAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryUseMappingFileAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryUseMappingFileAction_hsqldb_e_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryUseMappingFileAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryUseMappingFileAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryUseMappingFileAction_hsqldb_h_o_hibernate.hbm.xml diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ListAsIdBagAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ListAsIdBagAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b1f84bb57 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ListAsIdBagAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,41 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <idbag name="manies" table="`ONE_MANY`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`ONE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Many" unique="false" foreign-key="ONE_MANIES"> + <column name="`MANY_E_ID`" unique="false"/> + </many-to-many> + </idbag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ListAsIdBagAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ListAsIdBagAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6cd6e1077 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ListAsIdBagAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,47 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <idbag name="manies" table="`ONE_MANY`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`ONE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Many" unique="false" foreign-key="ONE_MANIES"> + <column name="`MANY_E_ID`" unique="false"/> + </many-to-many> + </idbag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..79b930a47 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,213 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="mindmap.PriorityObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.example.org/mindmap</param> + <param name="edatatype">PriorityObject</param> + </typedef> + <typedef name="mindmap.RelationshipTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.example.org/mindmap</param> + <param name="edatatype">RelationshipTypeObject</param> + </typedef> + <class name="org.example.mindmap.impl.MapImpl" entity-name="Map" abstract="false" lazy="false" table="`MAP`"> + <meta attribute="eclassName" inherit="false">Map</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="rootTopics" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAP_ROOTTOPICS"> + <column name="`MAP_ROOTTOPICS_E_ID`" unique="false"/> + </key> + <list-index column="`MAP_ROOTTOPICS_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + <list name="relations" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAP_RELATIONS"> + <column name="`MAP_RELATIONS_E_ID`" unique="false"/> + </key> + <list-index column="`MAP_RELATIONS_IDX`"/> + <one-to-many entity-name="Relationship"/> + </list> + <list name="resources" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAP_RESOURCES"> + <column name="`MAP_RESOURCES_E_ID`" unique="false"/> + </key> + <list-index column="`MAP_RESOURCES_IDX`"/> + <one-to-many entity-name="Resource"/> + </list> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.example.mindmap.impl.RelationshipImpl" entity-name="Relationship" abstract="false" lazy="false" table="`RELATIONSHIP`"> + <meta attribute="eclassName" inherit="false">Relationship</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="label" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LABEL`"/> + </property> + <many-to-one name="source" entity-name="Topic" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RELATIONSHIP_SOURCE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TOPIC_SOURCE_E_ID`"/> + </many-to-one> + <many-to-one name="target" entity-name="Topic" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RELATIONSHIP_TARGET" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TOPIC_TARGET_E_ID`"/> + </many-to-one> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.example.mindmap.RelationshipType</param> + <param name="eclassifier">RelationshipType</param> + <param name="epackage">http://www.example.org/mindmap</param> + </type> + </property> + </class> + <class name="org.example.mindmap.impl.ResourceImpl" entity-name="Resource" abstract="false" lazy="false" table="`RESOURCE`"> + <meta attribute="eclassName" inherit="false">Resource</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="comments" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`THREAD_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`RESOURCE_COMMENTS_IDX`"/> + <one-to-many entity-name="Thread"/> + </list> + <property name="email" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`EMAIL`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="topics" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`RESOURCE_TOPIC`"> + <key update="true"> + <column name="`RESOURCE_E_ID`" unique="false"/> + </key> + <list-index column="`RESOURCE_TOPICS_IDX`"/> + <many-to-many entity-name="Topic" unique="false" foreign-key="RESOURCE_TOPICS"> + <column name="`TOPIC_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.example.mindmap.impl.ThreadImpl" entity-name="Thread" abstract="false" lazy="false" table="`THREAD`"> + <meta attribute="eclassName" inherit="false">Thread</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="items" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="THREAD_ITEMS"> + <column name="`THREAD_ITEMS_E_ID`" unique="false"/> + </key> + <list-index column="`THREAD_ITEMS_IDX`"/> + <one-to-many entity-name="ThreadItem"/> + </list> + <many-to-one name="author" entity-name="Resource" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="THREAD_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`THREAD_AUTHOR_E_ID`"/> + </many-to-one> + <property name="postDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`POSTDATE`"/> + </property> + <property name="subject" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SUBJECT`"/> + </property> + </class> + <class name="org.example.mindmap.impl.ThreadItemImpl" entity-name="ThreadItem" abstract="false" lazy="false" table="`THREADITEM`"> + <meta attribute="eclassName" inherit="false">ThreadItem</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="author" entity-name="Resource" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="THREADITEM_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`RESOURCE_AUTHOR_E_ID`"/> + </many-to-one> + <property name="body" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BODY`"/> + </property> + <property name="itemPostDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`ITEMPOSTDATE`"/> + </property> + </class> + <class name="org.example.mindmap.impl.TopicImpl" entity-name="Topic" abstract="false" lazy="false" table="`TOPIC`"> + <meta attribute="eclassName" inherit="false">Topic</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="comments" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TOPIC_COMMENTS"> + <column name="`TOPIC_COMMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_COMMENTS_IDX`"/> + <one-to-many entity-name="Thread"/> + </list> + <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`DURATION`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="percentComplete" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`PERCENTCOMPLETE`"/> + </property> + <property name="priority" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`PRIORITY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.example.mindmap.Priority</param> + <param name="eclassifier">Priority</param> + <param name="epackage">http://www.example.org/mindmap</param> + </type> + </property> + <list name="resources" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`TOPIC_RESOURCE`"> + <key update="true"> + <column name="`TOPIC_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_RESOURCES_IDX`"/> + <many-to-many entity-name="Resource" unique="false" foreign-key="TOPIC_RESOURCES"> + <column name="`RESOURCE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + <property name="startDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`STARTDATE`"/> + </property> + <list name="subtopics" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="TOPIC_SUBTOPICS"> + <column name="`TOPIC_SUBTOPICS_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_SUBTOPICS_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..e08e098eb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,231 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="mindmap.PriorityObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.example.org/mindmap</param> + <param name="edatatype">PriorityObject</param> + </typedef> + <typedef name="mindmap.RelationshipTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.example.org/mindmap</param> + <param name="edatatype">RelationshipTypeObject</param> + </typedef> + <class name="org.example.mindmap.impl.MapImpl" entity-name="Map" abstract="false" lazy="false" discriminator-value="Map" table="`MAP`"> + <meta attribute="eclassName" inherit="false">Map</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MAPDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="rootTopics" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAP_ROOTTOPICS"> + <column name="`MAP_ROOTTOPICS_E_ID`" unique="false"/> + </key> + <list-index column="`MAP_ROOTTOPICS_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + <list name="relations" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAP_RELATIONS"> + <column name="`MAP_RELATIONS_E_ID`" unique="false"/> + </key> + <list-index column="`MAP_RELATIONS_IDX`"/> + <one-to-many entity-name="Relationship"/> + </list> + <list name="resources" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MAP_RESOURCES"> + <column name="`MAP_RESOURCES_E_ID`" unique="false"/> + </key> + <list-index column="`MAP_RESOURCES_IDX`"/> + <one-to-many entity-name="Resource"/> + </list> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.example.mindmap.impl.RelationshipImpl" entity-name="Relationship" abstract="false" lazy="false" discriminator-value="Relationship" table="`RELATIONSHIP`"> + <meta attribute="eclassName" inherit="false">Relationship</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RELATIONSHIPDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="label" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LABEL`"/> + </property> + <many-to-one name="source" entity-name="Topic" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RELATIONSHIP_SOURCE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TOPIC_SOURCE_E_ID`"/> + </many-to-one> + <many-to-one name="target" entity-name="Topic" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RELATIONSHIP_TARGET" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TOPIC_TARGET_E_ID`"/> + </many-to-one> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.example.mindmap.RelationshipType</param> + <param name="eclassifier">RelationshipType</param> + <param name="epackage">http://www.example.org/mindmap</param> + </type> + </property> + </class> + <class name="org.example.mindmap.impl.ResourceImpl" entity-name="Resource" abstract="false" lazy="false" discriminator-value="Resource" table="`RESOURCE`"> + <meta attribute="eclassName" inherit="false">Resource</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RESOURCEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="comments" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`THREAD_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`RESOURCE_COMMENTS_IDX`"/> + <one-to-many entity-name="Thread"/> + </list> + <property name="email" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`EMAIL`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="topics" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`RESOURCE_TOPIC`"> + <key update="true"> + <column name="`RESOURCE_E_ID`" unique="false"/> + </key> + <list-index column="`RESOURCE_TOPICS_IDX`"/> + <many-to-many entity-name="Topic" unique="false" foreign-key="RESOURCE_TOPICS"> + <column name="`TOPIC_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.example.mindmap.impl.ThreadImpl" entity-name="Thread" abstract="false" lazy="false" discriminator-value="Thread" table="`THREAD`"> + <meta attribute="eclassName" inherit="false">Thread</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="THREADDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="items" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="THREAD_ITEMS"> + <column name="`THREAD_ITEMS_E_ID`" unique="false"/> + </key> + <list-index column="`THREAD_ITEMS_IDX`"/> + <one-to-many entity-name="ThreadItem"/> + </list> + <many-to-one name="author" entity-name="Resource" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="THREAD_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`THREAD_AUTHOR_E_ID`"/> + </many-to-one> + <property name="postDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`POSTDATE`"/> + </property> + <property name="subject" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SUBJECT`"/> + </property> + </class> + <class name="org.example.mindmap.impl.ThreadItemImpl" entity-name="ThreadItem" abstract="false" lazy="false" discriminator-value="ThreadItem" table="`THREADITEM`"> + <meta attribute="eclassName" inherit="false">ThreadItem</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="THREADITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="author" entity-name="Resource" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="THREADITEM_AUTHOR" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`RESOURCE_AUTHOR_E_ID`"/> + </many-to-one> + <property name="body" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BODY`"/> + </property> + <property name="itemPostDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`ITEMPOSTDATE`"/> + </property> + </class> + <class name="org.example.mindmap.impl.TopicImpl" entity-name="Topic" abstract="false" lazy="false" discriminator-value="Topic" table="`TOPIC`"> + <meta attribute="eclassName" inherit="false">Topic</meta> + <meta attribute="epackage" inherit="false">http://www.example.org/mindmap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TOPICDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="comments" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TOPIC_COMMENTS"> + <column name="`TOPIC_COMMENTS_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_COMMENTS_IDX`"/> + <one-to-many entity-name="Thread"/> + </list> + <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`DURATION`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="percentComplete" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`PERCENTCOMPLETE`"/> + </property> + <property name="priority" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`PRIORITY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.example.mindmap.Priority</param> + <param name="eclassifier">Priority</param> + <param name="epackage">http://www.example.org/mindmap</param> + </type> + </property> + <list name="resources" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`TOPIC_RESOURCE`"> + <key update="true"> + <column name="`TOPIC_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_RESOURCES_IDX`"/> + <many-to-many entity-name="Resource" unique="false" foreign-key="TOPIC_RESOURCES"> + <column name="`RESOURCE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + <property name="startDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`STARTDATE`"/> + </property> + <list name="subtopics" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="TOPIC_SUBTOPICS"> + <column name="`TOPIC_SUBTOPICS_E_ID`" unique="false"/> + </key> + <list-index column="`TOPIC_SUBTOPICS_IDX`"/> + <one-to-many entity-name="Topic"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/NoEscapeLibraryAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/NoEscapeLibraryAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..155ee0f2d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/NoEscapeLibraryAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,91 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="BOOK"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="TITLE" length="50"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="PAGES"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="CATEGORY"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="BOOK_AUTHOR_E_ID"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="TEST"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="LIBRARY"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="NAME" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="LIBRARY_WRITERS_E_ID" unique="false"/> + </key> + <list-index column="TEST_INDEX"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="LIBRARY_BOOKS_E_ID" unique="false"/> + </key> + <list-index column="LIBRARY_BOOKS_IDX"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="WRITER"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="NAME" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="BOOK_AUTHOR_E_ID" unique="false"/> + </key> + <list-index column="WRITER_BOOKS_IDX"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/NoEscapeLibraryAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/NoEscapeLibraryAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..638b9ca2f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/NoEscapeLibraryAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,100 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="BOOK"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="TITLE" length="50"/> + </id> + <discriminator type="string"> + <column name="DTYPE" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="PAGES"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="CATEGORY"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="BOOK_AUTHOR_E_ID"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="TEST"/> + </property> + </class> + <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="LIBRARY"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="DTYPE" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="NAME" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="LIBRARY_WRITERS_E_ID" unique="false"/> + </key> + <list-index column="TEST_INDEX"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="LIBRARY_BOOKS_E_ID" unique="false"/> + </key> + <list-index column="LIBRARY_BOOKS_IDX"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="WRITER"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="DTYPE" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="NAME" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="BOOK_AUTHOR_E_ID" unique="false"/> + </key> + <list-index column="WRITER_BOOKS_IDX"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..edda08af0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,215 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.ActTypeImpl" entity-name="ActType" abstract="false" lazy="false" table="`ACTTYPE`"> + <meta attribute="eclassName" inherit="false">ActType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="scene" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACTTYPE_SCENE"> + <column name="`ACTTYPE_SCENE_E_ID`" unique="false"/> + </key> + <list-index column="`ACTTYPE_SCENE_IDX`"/> + <one-to-many entity-name="SceneType"/> + </list> + <property name="pindex" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`PINDEX`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.FmTypeImpl" entity-name="FmType" abstract="false" lazy="false" table="`FMTYPE`"> + <meta attribute="eclassName" inherit="false">FmType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="p" table="`FMTYPE_P`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`FMTYPE_P_E_ID`" unique="false"/> + </key> + <list-index column="`FMTYPE_P_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.PersonaeTypeImpl" entity-name="PersonaeType" abstract="false" lazy="false" table="`PERSONAETYPE`"> + <meta attribute="eclassName" inherit="false">PersonaeType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`PERSONAETYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSONAETYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`PERSONAETYPE_GROUP_IDX`"/> + <one-to-many entity-name="PersonaeType_group"/> + </list> + </class> + <class entity-name="PersonaeType_group" lazy="false" table="`PERSONAETYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">PersonaeType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_TITLE`"/> + </property> + <property name="persona" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_PERSONA`"/> + </property> + <many-to-one name="personaGroup" entity-name="PersonaGroupType" lazy="false" cascade="all" foreign-key="PERSONAETYPE_PERSONAGROUP" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_PERSONAGROUPTYPE_PERSONAGROUP_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.PersonaGroupTypeImpl" entity-name="PersonaGroupType" abstract="false" lazy="false" table="`PERSONAGROUPTYPE`"> + <meta attribute="eclassName" inherit="false">PersonaGroupType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="persona" table="`PERSONAGROUPTYPE_PERSONA`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSONAGROUPTYPE_PERSONA_E_ID`" unique="false"/> + </key> + <list-index column="`PERSONAGROUPTYPE_PERSONA_IDX`"/> + <element type="java.lang.String"/> + </list> + <property name="groupDescription" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`GROUPDESCRIPTION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.PlayTypeImpl" entity-name="PlayType" abstract="false" lazy="false" table="`PLAYTYPE`"> + <meta attribute="eclassName" inherit="false">PlayType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <many-to-one name="fm" entity-name="FmType" lazy="false" cascade="all" foreign-key="PLAYTYPE_FM" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`FMTYPE_FM_E_ID`"/> + </many-to-one> + <many-to-one name="personae" entity-name="PersonaeType" lazy="false" cascade="all" foreign-key="PLAYTYPE_PERSONAE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PERSONAETYPE_PERSONAE_E_ID`"/> + </many-to-one> + <property name="sceneDescription" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`SCENEDESCRIPTION`"/> + </property> + <property name="playSubTitle" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PLAYSUBTITLE`"/> + </property> + <list name="act" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PLAYTYPE_ACT"> + <column name="`PLAYTYPE_ACT_E_ID`" unique="false"/> + </key> + <list-index column="`PLAYTYPE_ACT_IDX`"/> + <one-to-many entity-name="ActType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.SceneTypeImpl" entity-name="SceneType" abstract="false" lazy="false" table="`SCENETYPE`"> + <meta attribute="eclassName" inherit="false">SceneType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`SCENETYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SCENETYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`SCENETYPE_GROUP_IDX`"/> + <one-to-many entity-name="SceneType_group"/> + </list> + <property name="pindex" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PINDEX`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class entity-name="SceneType_group" lazy="false" table="`SCENETYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SceneType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_STAGEDIRECTIONS`"/> + </property> + <many-to-one name="speech" entity-name="SpeechType" lazy="false" cascade="all" foreign-key="SCENETYPE_SPEECH" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_SPEECHTYPE_SPEECH_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.SpeechTypeImpl" entity-name="SpeechType" abstract="false" lazy="false" table="`SPEECHTYPE`"> + <meta attribute="eclassName" inherit="false">SpeechType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`SPEECHTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SPEECHTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`SPEECHTYPE_GROUP_IDX`"/> + <one-to-many entity-name="SpeechType_group"/> + </list> + </class> + <class entity-name="SpeechType_group" lazy="false" table="`SPEECHTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SpeechType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="speaker" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_SPEAKER`"/> + </property> + <property name="line" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_LINE`"/> + </property> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_STAGEDIRECTIONS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c2e46214c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,236 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.ActTypeImpl" entity-name="ActType" abstract="false" lazy="false" discriminator-value="ActType" table="`ACTTYPE`"> + <meta attribute="eclassName" inherit="false">ActType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ACTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="scene" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="ACTTYPE_SCENE"> + <column name="`ACTTYPE_SCENE_E_ID`" unique="false"/> + </key> + <list-index column="`ACTTYPE_SCENE_IDX`"/> + <one-to-many entity-name="SceneType"/> + </list> + <property name="pindex" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`PINDEX`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.FmTypeImpl" entity-name="FmType" abstract="false" lazy="false" discriminator-value="FmType" table="`FMTYPE`"> + <meta attribute="eclassName" inherit="false">FmType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FMTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="p" table="`FMTYPE_P`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`FMTYPE_P_E_ID`" unique="false"/> + </key> + <list-index column="`FMTYPE_P_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.PersonaeTypeImpl" entity-name="PersonaeType" abstract="false" lazy="false" discriminator-value="PersonaeType" table="`PERSONAETYPE`"> + <meta attribute="eclassName" inherit="false">PersonaeType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONAETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`PERSONAETYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSONAETYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`PERSONAETYPE_GROUP_IDX`"/> + <one-to-many entity-name="PersonaeType_group"/> + </list> + </class> + <class entity-name="PersonaeType_group" lazy="false" table="`PERSONAETYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">PersonaeType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_TITLE`"/> + </property> + <property name="persona" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_PERSONA`"/> + </property> + <many-to-one name="personaGroup" entity-name="PersonaGroupType" lazy="false" cascade="all" foreign-key="PERSONAETYPE_PERSONAGROUP" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_PERSONAGROUPTYPE_PERSONAGROUP_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.PersonaGroupTypeImpl" entity-name="PersonaGroupType" abstract="false" lazy="false" discriminator-value="PersonaGroupType" table="`PERSONAGROUPTYPE`"> + <meta attribute="eclassName" inherit="false">PersonaGroupType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONAGROUPTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="persona" table="`PERSONAGROUPTYPE_PERSONA`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`PERSONAGROUPTYPE_PERSONA_E_ID`" unique="false"/> + </key> + <list-index column="`PERSONAGROUPTYPE_PERSONA_IDX`"/> + <element type="java.lang.String"/> + </list> + <property name="groupDescription" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`GROUPDESCRIPTION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.PlayTypeImpl" entity-name="PlayType" abstract="false" lazy="false" discriminator-value="PlayType" table="`PLAYTYPE`"> + <meta attribute="eclassName" inherit="false">PlayType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PLAYTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <many-to-one name="fm" entity-name="FmType" lazy="false" cascade="all" foreign-key="PLAYTYPE_FM" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`FMTYPE_FM_E_ID`"/> + </many-to-one> + <many-to-one name="personae" entity-name="PersonaeType" lazy="false" cascade="all" foreign-key="PLAYTYPE_PERSONAE" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PERSONAETYPE_PERSONAE_E_ID`"/> + </many-to-one> + <property name="sceneDescription" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`SCENEDESCRIPTION`"/> + </property> + <property name="playSubTitle" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PLAYSUBTITLE`"/> + </property> + <list name="act" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PLAYTYPE_ACT"> + <column name="`PLAYTYPE_ACT_E_ID`" unique="false"/> + </key> + <list-index column="`PLAYTYPE_ACT_IDX`"/> + <one-to-many entity-name="ActType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.SceneTypeImpl" entity-name="SceneType" abstract="false" lazy="false" discriminator-value="SceneType" table="`SCENETYPE`"> + <meta attribute="eclassName" inherit="false">SceneType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SCENETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`SCENETYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SCENETYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`SCENETYPE_GROUP_IDX`"/> + <one-to-many entity-name="SceneType_group"/> + </list> + <property name="pindex" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PINDEX`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class entity-name="SceneType_group" lazy="false" table="`SCENETYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SceneType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_STAGEDIRECTIONS`"/> + </property> + <many-to-one name="speech" entity-name="SpeechType" lazy="false" cascade="all" foreign-key="SCENETYPE_SPEECH" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_SPEECHTYPE_SPEECH_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.play.impl.SpeechTypeImpl" entity-name="SpeechType" abstract="false" lazy="false" discriminator-value="SpeechType" table="`SPEECHTYPE`"> + <meta attribute="eclassName" inherit="false">SpeechType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/play</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SPEECHTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`SPEECHTYPE_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SPEECHTYPE_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`SPEECHTYPE_GROUP_IDX`"/> + <one-to-many entity-name="SpeechType_group"/> + </list> + </class> + <class entity-name="SpeechType_group" lazy="false" table="`SPEECHTYPE_GROUP`"> + <meta attribute="featureMap" inherit="false">SpeechType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="speaker" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_SPEAKER`"/> + </property> + <property name="line" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_LINE`"/> + </property> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_STAGEDIRECTIONS`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..28f600bde --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,93 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schemaprimerpo.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpo</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="productName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PRODUCTNAME`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`QUANTITY`"/> + </property> + <property name="uSPrice" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`USPRICE`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="shipDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`SHIPDATE`"/> + </property> + <property name="partNum" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PARTNUM`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schemaprimerpo.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpo</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="shipTo" entity-name="USAddress" lazy="false" cascade="all" foreign-key="PURCHASEORDER_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`USADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <many-to-one name="billTo" entity-name="USAddress" lazy="false" cascade="all" foreign-key="PURCHASEORDER_BILLTO" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`USADDRESS_BILLTO_E_ID`"/> + </many-to-one> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <list name="items" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PURCHASEORDER_ITEMS"> + <column name="`PURCHASEORDER_ITEMS_E_ID`" unique="false"/> + </key> + <list-index column="`PURCHASEORDER_ITEMS_IDX`"/> + <one-to-many entity-name="Item"/> + </list> + <property name="orderDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`ORDERDATE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schemaprimerpo.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpo</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + <property name="state" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STATE`"/> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`ZIP`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5d3655098 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,102 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schemaprimerpo.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpo</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="productName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PRODUCTNAME`"/> + </property> + <property name="quantity" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`QUANTITY`"/> + </property> + <property name="uSPrice" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`USPRICE`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="shipDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`SHIPDATE`"/> + </property> + <property name="partNum" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PARTNUM`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schemaprimerpo.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" discriminator-value="PurchaseOrder" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpo</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PURCHASEORDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="shipTo" entity-name="USAddress" lazy="false" cascade="all" foreign-key="PURCHASEORDER_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`USADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <many-to-one name="billTo" entity-name="USAddress" lazy="false" cascade="all" foreign-key="PURCHASEORDER_BILLTO" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`USADDRESS_BILLTO_E_ID`"/> + </many-to-one> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <list name="items" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PURCHASEORDER_ITEMS"> + <column name="`PURCHASEORDER_ITEMS_E_ID`" unique="false"/> + </key> + <list-index column="`PURCHASEORDER_ITEMS_IDX`"/> + <one-to-many entity-name="Item"/> + </list> + <property name="orderDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`ORDERDATE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.schemaprimerpo.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" discriminator-value="USAddress" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpo</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="USADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + <property name="state" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STATE`"/> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`ZIP`"/> + </property> + <property name="country" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COUNTRY`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ProductAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ProductAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..784acc8e9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ProductAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,72 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/product</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <many-to-one name="supplier" entity-name="SupplierType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_SUPPLIER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SUPPLIERTYPE_SUPPLIER_E_ID`"/> + </many-to-one> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="createdOn" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`CREATEDON`"/> + </property> + <any id-type="long" meta-type="string" name="AnyOne" cascade="all"> + <column not-null="false" unique="false" name="`ANYONE_TYPE`"/> + <column not-null="false" unique="false" name="`ANYONE_ID`"/> + </any> + <list name="AnyList" table="`PRODUCTTYPE_ANYLIST`" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PRODUCTTYPE_ANYLIST"> + <column name="`PRODUCTTYPE_ID`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_ANYLIST_IDX`"/> + <many-to-any id-type="long" meta-type="string"> + <column not-null="false" unique="false" name="`ANYLIST_TYPE`"/> + <column not-null="false" unique="false" name="`ANYLIST_ID`"/> + </many-to-any> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" table="`SUPPLIERTYPE`"> + <meta attribute="eclassName" inherit="false">SupplierType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/product</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="noOfEmployees" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NOOFEMPLOYEES`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ClassificationTypeImpl" entity-name="ClassificationType" abstract="false" lazy="false" table="`CLASSIFICATIONTYPE`"> + <meta attribute="eclassName" inherit="false">ClassificationType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/product</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ProductAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ProductAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..708fd21ad --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/ProductAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,81 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ProductTypeImpl" entity-name="ProductType" abstract="false" lazy="false" discriminator-value="ProductType" table="`PRODUCTTYPE`"> + <meta attribute="eclassName" inherit="false">ProductType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/product</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PRODUCTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <many-to-one name="supplier" entity-name="SupplierType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PRODUCTTYPE_SUPPLIER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SUPPLIERTYPE_SUPPLIER_E_ID`"/> + </many-to-one> + <property name="price" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`PRICE`"/> + </property> + <property name="createdOn" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`CREATEDON`"/> + </property> + <any id-type="long" meta-type="string" name="AnyOne" cascade="all"> + <column not-null="false" unique="false" name="`ANYONE_TYPE`"/> + <column not-null="false" unique="false" name="`ANYONE_ID`"/> + </any> + <list name="AnyList" table="`PRODUCTTYPE_ANYLIST`" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PRODUCTTYPE_ANYLIST"> + <column name="`PRODUCTTYPE_ID`" unique="false"/> + </key> + <list-index column="`PRODUCTTYPE_ANYLIST_IDX`"/> + <many-to-any id-type="long" meta-type="string"> + <column not-null="false" unique="false" name="`ANYLIST_TYPE`"/> + <column not-null="false" unique="false" name="`ANYLIST_ID`"/> + </many-to-any> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.SupplierTypeImpl" entity-name="SupplierType" abstract="false" lazy="false" discriminator-value="SupplierType" table="`SUPPLIERTYPE`"> + <meta attribute="eclassName" inherit="false">SupplierType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/product</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="noOfEmployees" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`NOOFEMPLOYEES`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.product.impl.ClassificationTypeImpl" entity-name="ClassificationType" abstract="false" lazy="false" discriminator-value="ClassificationType" table="`CLASSIFICATIONTYPE`"> + <meta attribute="eclassName" inherit="false">ClassificationType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/product</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CLASSIFICATIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalMapAsClassAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalMapAsClassAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..669681f39 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalMapAsClassAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,120 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="rental.RentalBicycleTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalBicycleTypeObject</param> + </typedef> + <typedef name="rental.RentalCarSizeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalCarSizeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.rental.impl.RentalUnitImpl" entity-name="RentalUnit" abstract="true" lazy="true" table="`RENTALUNIT`" proxy="org.eclipse.emf.teneo.rental.RentalUnit"> + <meta attribute="eclassName" inherit="false">RentalUnit</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id name="description" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.rental.impl.RentalBicycleImpl" entity-name="RentalBicycle" abstract="false" lazy="true" extends="RentalUnit" table="`RENTALBICYCLE`" proxy="org.eclipse.emf.teneo.rental.RentalBicycle"> + <meta attribute="eclassName" inherit="false">RentalBicycle</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <key> + <column name="`RENTALUNIT_DESCRIPTION`"/> + </key> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalBicycleType</param> + <param name="eclassifier">RentalBicycleType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + <many-to-one name="manufacturer" entity-name="Manufacturer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALBICYCLE_MANUFACTURER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`MANUFACTURER_MANUFACTURER_E_ID`"/> + </many-to-one> + </joined-subclass> + <class name="org.eclipse.emf.teneo.rental.impl.CurrencyImpl" entity-name="Currency" abstract="false" lazy="true" table="`CURRENCY`" proxy="org.eclipse.emf.teneo.rental.Currency"> + <meta attribute="eclassName" inherit="false">Currency</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.rental.impl.RentalCarImpl" entity-name="RentalCar" abstract="false" lazy="true" extends="RentalUnit" table="`RENTALCAR`" proxy="org.eclipse.emf.teneo.rental.RentalCar"> + <meta attribute="eclassName" inherit="false">RentalCar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <key> + <column name="`RENTALUNIT_DESCRIPTION`"/> + </key> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalCarSize</param> + <param name="eclassifier">RentalCarSize</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.rental.impl.RentalContractImpl" entity-name="RentalContract" abstract="false" lazy="true" table="`RENTALCONTRACT`" proxy="org.eclipse.emf.teneo.rental.RentalContract"> + <meta attribute="eclassName" inherit="false">RentalContract</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="rentToBusinessPartner" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`RENTTOBUSINESSPARTNER`"/> + </property> + <property name="startDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="cost" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`COST`"/> + </property> + <list name="rentalUnits" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="RENTALCONTRACT_RENTALUNITS"> + <column name="`RENTALCONTRACT_RENTALUNITS_E_ID`" unique="false"/> + </key> + <list-index column="`RENTALCONTRACT_RENTALUNITS_IDX`"/> + <one-to-many entity-name="RentalUnit"/> + </list> + <many-to-one name="currency" entity-name="Currency" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALCONTRACT_CURRENCY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CURRENCY_CURRENCY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.rental.impl.ManufacturerImpl" entity-name="Manufacturer" abstract="false" lazy="true" table="`MANUFACTURER`" proxy="org.eclipse.emf.teneo.rental.Manufacturer"> + <meta attribute="eclassName" inherit="false">Manufacturer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="trusted" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`TRUSTED`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalMapAsClassAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalMapAsClassAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..99ba3d288 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalMapAsClassAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,126 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="rental.RentalBicycleTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalBicycleTypeObject</param> + </typedef> + <typedef name="rental.RentalCarSizeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalCarSizeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.rental.impl.RentalUnitImpl" entity-name="RentalUnit" abstract="true" lazy="true" discriminator-value="RentalUnit" table="`RENTALUNIT`" proxy="org.eclipse.emf.teneo.rental.RentalUnit"> + <meta attribute="eclassName" inherit="false">RentalUnit</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id name="description" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RENTALUNITDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.rental.impl.RentalBicycleImpl" entity-name="RentalBicycle" abstract="false" lazy="true" extends="RentalUnit" discriminator-value="RentalBicycle" proxy="org.eclipse.emf.teneo.rental.RentalBicycle"> + <meta attribute="eclassName" inherit="false">RentalBicycle</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalBicycleType</param> + <param name="eclassifier">RentalBicycleType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + <many-to-one name="manufacturer" entity-name="Manufacturer" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALBICYCLE_MANUFACTURER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MANUFACTURER_MANUFACTURER_E_ID`"/> + </many-to-one> + </subclass> + <class name="org.eclipse.emf.teneo.rental.impl.CurrencyImpl" entity-name="Currency" abstract="false" lazy="true" discriminator-value="Currency" table="`CURRENCY`" proxy="org.eclipse.emf.teneo.rental.Currency"> + <meta attribute="eclassName" inherit="false">Currency</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CURRENCYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.rental.impl.RentalCarImpl" entity-name="RentalCar" abstract="false" lazy="true" extends="RentalUnit" discriminator-value="RentalCar" proxy="org.eclipse.emf.teneo.rental.RentalCar"> + <meta attribute="eclassName" inherit="false">RentalCar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalCarSize</param> + <param name="eclassifier">RentalCarSize</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.rental.impl.RentalContractImpl" entity-name="RentalContract" abstract="false" lazy="true" discriminator-value="RentalContract" table="`RENTALCONTRACT`" proxy="org.eclipse.emf.teneo.rental.RentalContract"> + <meta attribute="eclassName" inherit="false">RentalContract</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RENTALCONTRACTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="rentToBusinessPartner" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`RENTTOBUSINESSPARTNER`"/> + </property> + <property name="startDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="cost" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`COST`"/> + </property> + <list name="rentalUnits" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="RENTALCONTRACT_RENTALUNITS"> + <column name="`RENTALCONTRACT_RENTALUNITS_E_ID`" unique="false"/> + </key> + <list-index column="`RENTALCONTRACT_RENTALUNITS_IDX`"/> + <one-to-many entity-name="RentalUnit"/> + </list> + <many-to-one name="currency" entity-name="Currency" lazy="proxy" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALCONTRACT_CURRENCY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CURRENCY_CURRENCY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.rental.impl.ManufacturerImpl" entity-name="Manufacturer" abstract="false" lazy="true" discriminator-value="Manufacturer" table="`MANUFACTURER`" proxy="org.eclipse.emf.teneo.rental.Manufacturer"> + <meta attribute="eclassName" inherit="false">Manufacturer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANUFACTURERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="trusted" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`TRUSTED`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalResourceReferenceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalResourceReferenceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c9192e96b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalResourceReferenceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,120 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="rental.RentalBicycleTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalBicycleTypeObject</param> + </typedef> + <typedef name="rental.RentalCarSizeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalCarSizeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.rental.impl.RentalUnitImpl" entity-name="RentalUnit" abstract="true" lazy="false" table="`RENTALUNIT`"> + <meta attribute="eclassName" inherit="false">RentalUnit</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id name="description" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.rental.impl.RentalBicycleImpl" entity-name="RentalBicycle" abstract="false" lazy="false" extends="RentalUnit" table="`RENTALBICYCLE`"> + <meta attribute="eclassName" inherit="false">RentalBicycle</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <key> + <column name="`RENTALUNIT_DESCRIPTION`"/> + </key> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalBicycleType</param> + <param name="eclassifier">RentalBicycleType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + <many-to-one name="manufacturer" entity-name="Manufacturer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALBICYCLE_MANUFACTURER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`MANUFACTURER_MANUFACTURER_E_ID`"/> + </many-to-one> + </joined-subclass> + <class name="org.eclipse.emf.teneo.rental.impl.CurrencyImpl" entity-name="Currency" abstract="false" lazy="false" table="`CURRENCY`"> + <meta attribute="eclassName" inherit="false">Currency</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.rental.impl.RentalCarImpl" entity-name="RentalCar" abstract="false" lazy="false" extends="RentalUnit" table="`RENTALCAR`"> + <meta attribute="eclassName" inherit="false">RentalCar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <key> + <column name="`RENTALUNIT_DESCRIPTION`"/> + </key> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalCarSize</param> + <param name="eclassifier">RentalCarSize</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.rental.impl.RentalContractImpl" entity-name="RentalContract" abstract="false" lazy="false" table="`RENTALCONTRACT`"> + <meta attribute="eclassName" inherit="false">RentalContract</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="rentToBusinessPartner" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`RENTTOBUSINESSPARTNER`"/> + </property> + <property name="startDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="cost" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`COST`"/> + </property> + <list name="rentalUnits" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="RENTALCONTRACT_RENTALUNITS"> + <column name="`RENTALCONTRACT_RENTALUNITS_E_ID`" unique="false"/> + </key> + <list-index column="`RENTALCONTRACT_RENTALUNITS_IDX`"/> + <one-to-many entity-name="RentalUnit"/> + </list> + <many-to-one name="currency" entity-name="Currency" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALCONTRACT_CURRENCY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CURRENCY_CURRENCY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.rental.impl.ManufacturerImpl" entity-name="Manufacturer" abstract="false" lazy="false" table="`MANUFACTURER`"> + <meta attribute="eclassName" inherit="false">Manufacturer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="trusted" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`TRUSTED`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalResourceReferenceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalResourceReferenceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b6199ffdc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/RentalResourceReferenceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,126 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="rental.RentalBicycleTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalBicycleTypeObject</param> + </typedef> + <typedef name="rental.RentalCarSizeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalCarSizeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.rental.impl.RentalUnitImpl" entity-name="RentalUnit" abstract="true" lazy="false" discriminator-value="RentalUnit" table="`RENTALUNIT`"> + <meta attribute="eclassName" inherit="false">RentalUnit</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id name="description" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RENTALUNITDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.rental.impl.RentalBicycleImpl" entity-name="RentalBicycle" abstract="false" lazy="false" extends="RentalUnit" discriminator-value="RentalBicycle"> + <meta attribute="eclassName" inherit="false">RentalBicycle</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalBicycleType</param> + <param name="eclassifier">RentalBicycleType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + <many-to-one name="manufacturer" entity-name="Manufacturer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALBICYCLE_MANUFACTURER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MANUFACTURER_MANUFACTURER_E_ID`"/> + </many-to-one> + </subclass> + <class name="org.eclipse.emf.teneo.rental.impl.CurrencyImpl" entity-name="Currency" abstract="false" lazy="false" discriminator-value="Currency" table="`CURRENCY`"> + <meta attribute="eclassName" inherit="false">Currency</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CURRENCYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.rental.impl.RentalCarImpl" entity-name="RentalCar" abstract="false" lazy="false" extends="RentalUnit" discriminator-value="RentalCar"> + <meta attribute="eclassName" inherit="false">RentalCar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalCarSize</param> + <param name="eclassifier">RentalCarSize</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.rental.impl.RentalContractImpl" entity-name="RentalContract" abstract="false" lazy="false" discriminator-value="RentalContract" table="`RENTALCONTRACT`"> + <meta attribute="eclassName" inherit="false">RentalContract</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RENTALCONTRACTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="rentToBusinessPartner" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`RENTTOBUSINESSPARTNER`"/> + </property> + <property name="startDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="cost" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`COST`"/> + </property> + <list name="rentalUnits" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="RENTALCONTRACT_RENTALUNITS"> + <column name="`RENTALCONTRACT_RENTALUNITS_E_ID`" unique="false"/> + </key> + <list-index column="`RENTALCONTRACT_RENTALUNITS_IDX`"/> + <one-to-many entity-name="RentalUnit"/> + </list> + <many-to-one name="currency" entity-name="Currency" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALCONTRACT_CURRENCY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CURRENCY_CURRENCY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.rental.impl.ManufacturerImpl" entity-name="Manufacturer" abstract="false" lazy="false" discriminator-value="Manufacturer" table="`MANUFACTURER`"> + <meta attribute="eclassName" inherit="false">Manufacturer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANUFACTURERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="trusted" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`TRUSTED`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleLibraryResourceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleLibraryResourceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1f2bf267e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleLibraryResourceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleLibraryResourceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleLibraryResourceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..30e3ba6d0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleLibraryResourceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleRentalAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleRentalAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c9192e96b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleRentalAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,120 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="rental.RentalBicycleTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalBicycleTypeObject</param> + </typedef> + <typedef name="rental.RentalCarSizeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalCarSizeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.rental.impl.RentalUnitImpl" entity-name="RentalUnit" abstract="true" lazy="false" table="`RENTALUNIT`"> + <meta attribute="eclassName" inherit="false">RentalUnit</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id name="description" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.rental.impl.RentalBicycleImpl" entity-name="RentalBicycle" abstract="false" lazy="false" extends="RentalUnit" table="`RENTALBICYCLE`"> + <meta attribute="eclassName" inherit="false">RentalBicycle</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <key> + <column name="`RENTALUNIT_DESCRIPTION`"/> + </key> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalBicycleType</param> + <param name="eclassifier">RentalBicycleType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + <many-to-one name="manufacturer" entity-name="Manufacturer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALBICYCLE_MANUFACTURER" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`MANUFACTURER_MANUFACTURER_E_ID`"/> + </many-to-one> + </joined-subclass> + <class name="org.eclipse.emf.teneo.rental.impl.CurrencyImpl" entity-name="Currency" abstract="false" lazy="false" table="`CURRENCY`"> + <meta attribute="eclassName" inherit="false">Currency</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.rental.impl.RentalCarImpl" entity-name="RentalCar" abstract="false" lazy="false" extends="RentalUnit" table="`RENTALCAR`"> + <meta attribute="eclassName" inherit="false">RentalCar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <key> + <column name="`RENTALUNIT_DESCRIPTION`"/> + </key> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalCarSize</param> + <param name="eclassifier">RentalCarSize</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.rental.impl.RentalContractImpl" entity-name="RentalContract" abstract="false" lazy="false" table="`RENTALCONTRACT`"> + <meta attribute="eclassName" inherit="false">RentalContract</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="rentToBusinessPartner" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`RENTTOBUSINESSPARTNER`"/> + </property> + <property name="startDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="cost" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`COST`"/> + </property> + <list name="rentalUnits" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="RENTALCONTRACT_RENTALUNITS"> + <column name="`RENTALCONTRACT_RENTALUNITS_E_ID`" unique="false"/> + </key> + <list-index column="`RENTALCONTRACT_RENTALUNITS_IDX`"/> + <one-to-many entity-name="RentalUnit"/> + </list> + <many-to-one name="currency" entity-name="Currency" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALCONTRACT_CURRENCY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CURRENCY_CURRENCY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.rental.impl.ManufacturerImpl" entity-name="Manufacturer" abstract="false" lazy="false" table="`MANUFACTURER`"> + <meta attribute="eclassName" inherit="false">Manufacturer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="trusted" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`TRUSTED`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleRentalAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleRentalAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b6199ffdc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SimpleRentalAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,126 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="rental.RentalBicycleTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalBicycleTypeObject</param> + </typedef> + <typedef name="rental.RentalCarSizeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + <param name="edatatype">RentalCarSizeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.rental.impl.RentalUnitImpl" entity-name="RentalUnit" abstract="true" lazy="false" discriminator-value="RentalUnit" table="`RENTALUNIT`"> + <meta attribute="eclassName" inherit="false">RentalUnit</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id name="description" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RENTALUNITDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.rental.impl.RentalBicycleImpl" entity-name="RentalBicycle" abstract="false" lazy="false" extends="RentalUnit" discriminator-value="RentalBicycle"> + <meta attribute="eclassName" inherit="false">RentalBicycle</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalBicycleType</param> + <param name="eclassifier">RentalBicycleType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + <many-to-one name="manufacturer" entity-name="Manufacturer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALBICYCLE_MANUFACTURER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MANUFACTURER_MANUFACTURER_E_ID`"/> + </many-to-one> + </subclass> + <class name="org.eclipse.emf.teneo.rental.impl.CurrencyImpl" entity-name="Currency" abstract="false" lazy="false" discriminator-value="Currency" table="`CURRENCY`"> + <meta attribute="eclassName" inherit="false">Currency</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CURRENCYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.rental.impl.RentalCarImpl" entity-name="RentalCar" abstract="false" lazy="false" extends="RentalUnit" discriminator-value="RentalCar"> + <meta attribute="eclassName" inherit="false">RentalCar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`SIZE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.rental.RentalCarSize</param> + <param name="eclassifier">RentalCarSize</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/rental</param> + </type> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.rental.impl.RentalContractImpl" entity-name="RentalContract" abstract="false" lazy="false" discriminator-value="RentalContract" table="`RENTALCONTRACT`"> + <meta attribute="eclassName" inherit="false">RentalContract</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="RENTALCONTRACTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="rentToBusinessPartner" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`RENTTOBUSINESSPARTNER`"/> + </property> + <property name="startDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`STARTDATE`"/> + </property> + <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`ENDDATE`"/> + </property> + <property name="cost" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`COST`"/> + </property> + <list name="rentalUnits" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="RENTALCONTRACT_RENTALUNITS"> + <column name="`RENTALCONTRACT_RENTALUNITS_E_ID`" unique="false"/> + </key> + <list-index column="`RENTALCONTRACT_RENTALUNITS_IDX`"/> + <one-to-many entity-name="RentalUnit"/> + </list> + <many-to-one name="currency" entity-name="Currency" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="RENTALCONTRACT_CURRENCY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CURRENCY_CURRENCY_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.rental.impl.ManufacturerImpl" entity-name="Manufacturer" abstract="false" lazy="false" discriminator-value="Manufacturer" table="`MANUFACTURER`"> + <meta attribute="eclassName" inherit="false">Manufacturer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/rental</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANUFACTURERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CODE`"/> + </property> + <property name="trusted" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`TRUSTED`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1e2e86281 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,123 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="sunBooks.BookCategoryTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</param> + <param name="edatatype">BookCategoryTypeObject</param> + </typedef> + <typedef name="sunBooks.BookCategoryTypeObject1" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</param> + <param name="edatatype">BookCategoryTypeObject1</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.AuthorsTypeImpl" entity-name="AuthorsType" abstract="false" lazy="false" table="`AUTHORSTYPE`"> + <meta attribute="eclassName" inherit="false">AuthorsType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="authorName" table="`AUTHORSTYPE_AUTHORNAME`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`AUTHORSTYPE_AUTHORNAME_E_ID`" unique="false"/> + </key> + <list-index column="`AUTHORSTYPE_AUTHORNAME_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.BooksTypeImpl" entity-name="BooksType" abstract="false" lazy="false" table="`BOOKSTYPE`"> + <meta attribute="eclassName" inherit="false">BooksType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="book" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKSTYPE_BOOK"> + <column name="`BOOKSTYPE_BOOK_E_ID`" unique="false"/> + </key> + <list-index column="`BOOKSTYPE_BOOK_IDX`"/> + <one-to-many entity-name="BookType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.BookTypeImpl" entity-name="BookType" abstract="false" lazy="false" table="`BOOKTYPE`"> + <meta attribute="eclassName" inherit="false">BookType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="iSBN" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ISBN`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PRICE`"/> + </property> + <many-to-one name="authors" entity-name="AuthorsType" lazy="false" cascade="all" foreign-key="BOOKTYPE_AUTHORS" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`AUTHORSTYPE_AUTHORS_E_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <many-to-one name="promotion" entity-name="PromotionType" lazy="false" cascade="all" foreign-key="BOOKTYPE_PROMOTION" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PROMOTIONTYPE_PROMOTION_E_ID`"/> + </many-to-one> + <property name="publicationDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`PUBLICATIONDATE`"/> + </property> + <property name="bookCategory" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`BOOKCATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.sunBooks.BookCategoryType1</param> + <param name="eclassifier">BookCategoryType1</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</param> + </type> + </property> + <property name="itemId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ITEMID`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.CollectionTypeImpl" entity-name="CollectionType" abstract="false" lazy="false" table="`COLLECTIONTYPE`"> + <meta attribute="eclassName" inherit="false">CollectionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="books" entity-name="BooksType" lazy="false" cascade="all" foreign-key="COLLECTIONTYPE_BOOKS" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`BOOKSTYPE_BOOKS_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.PromotionTypeImpl" entity-name="PromotionType" abstract="false" lazy="false" table="`PROMOTIONTYPE`"> + <meta attribute="eclassName" inherit="false">PromotionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="discount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISCOUNT`"/> + </property> + <property name="none" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NONE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..ed1ef02e8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,138 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="sunBooks.BookCategoryTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</param> + <param name="edatatype">BookCategoryTypeObject</param> + </typedef> + <typedef name="sunBooks.BookCategoryTypeObject1" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</param> + <param name="edatatype">BookCategoryTypeObject1</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.AuthorsTypeImpl" entity-name="AuthorsType" abstract="false" lazy="false" discriminator-value="AuthorsType" table="`AUTHORSTYPE`"> + <meta attribute="eclassName" inherit="false">AuthorsType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="AUTHORSTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="authorName" table="`AUTHORSTYPE_AUTHORNAME`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`AUTHORSTYPE_AUTHORNAME_E_ID`" unique="false"/> + </key> + <list-index column="`AUTHORSTYPE_AUTHORNAME_IDX`"/> + <element type="java.lang.String"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.BooksTypeImpl" entity-name="BooksType" abstract="false" lazy="false" discriminator-value="BooksType" table="`BOOKSTYPE`"> + <meta attribute="eclassName" inherit="false">BooksType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKSTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="book" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKSTYPE_BOOK"> + <column name="`BOOKSTYPE_BOOK_E_ID`" unique="false"/> + </key> + <list-index column="`BOOKSTYPE_BOOK_IDX`"/> + <one-to-many entity-name="BookType"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.BookTypeImpl" entity-name="BookType" abstract="false" lazy="false" discriminator-value="BookType" table="`BOOKTYPE`"> + <meta attribute="eclassName" inherit="false">BookType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="iSBN" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ISBN`"/> + </property> + <property name="price" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`PRICE`"/> + </property> + <many-to-one name="authors" entity-name="AuthorsType" lazy="false" cascade="all" foreign-key="BOOKTYPE_AUTHORS" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`AUTHORSTYPE_AUTHORS_E_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <many-to-one name="promotion" entity-name="PromotionType" lazy="false" cascade="all" foreign-key="BOOKTYPE_PROMOTION" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PROMOTIONTYPE_PROMOTION_E_ID`"/> + </many-to-one> + <property name="publicationDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`PUBLICATIONDATE`"/> + </property> + <property name="bookCategory" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`BOOKCATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.sunBooks.BookCategoryType1</param> + <param name="eclassifier">BookCategoryType1</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</param> + </type> + </property> + <property name="itemId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ITEMID`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.CollectionTypeImpl" entity-name="CollectionType" abstract="false" lazy="false" discriminator-value="CollectionType" table="`COLLECTIONTYPE`"> + <meta attribute="eclassName" inherit="false">CollectionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COLLECTIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="books" entity-name="BooksType" lazy="false" cascade="all" foreign-key="COLLECTIONTYPE_BOOKS" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`BOOKSTYPE_BOOKS_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.sunBooks.impl.PromotionTypeImpl" entity-name="PromotionType" abstract="false" lazy="false" discriminator-value="PromotionType" table="`PROMOTIONTYPE`"> + <meta attribute="eclassName" inherit="false">PromotionType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_books</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PROMOTIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="discount" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISCOUNT`"/> + </property> + <property name="none" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NONE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/WorkFlowAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/WorkFlowAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..193620975 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/WorkFlowAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,219 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.WorkflowElementImpl" entity-name="WorkflowElement" abstract="true" lazy="false" table="`WORKFLOWELEMENT`"> + <meta attribute="eclassName" inherit="false">WorkflowElement</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="x" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`X`"/> + </property> + <property name="y" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`Y`"/> + </property> + <property name="width" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`WIDTH`"/> + </property> + <property name="height" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`HEIGHT`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.WorkflowImpl" entity-name="Workflow" abstract="false" lazy="false" extends="WorkflowElement" table="`WORKFLOW`"> + <meta attribute="eclassName" inherit="false">Workflow</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWELEMENT_ID`"/> + </key> + <list name="nodes" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`WORKFLOWNODE_WORKFLOW_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOW_NODES_IDX`"/> + <one-to-many entity-name="WorkflowNode"/> + </list> + <list name="edges" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`EDGE_WORKFLOW_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOW_EDGES_IDX`"/> + <one-to-many entity-name="Edge"/> + </list> + <list name="comments" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`COMMENT_WORKFLOW_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOW_COMMENTS_IDX`"/> + <one-to-many entity-name="Comment"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.WorkflowNodeImpl" entity-name="WorkflowNode" abstract="true" lazy="false" extends="WorkflowElement" table="`WORKFLOWNODE`"> + <meta attribute="eclassName" inherit="false">WorkflowNode</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWELEMENT_ID`"/> + </key> + <many-to-one name="workflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WORKFLOWNODE_WORKFLOW" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`WORKFLOWNODE_WORKFLOW_ID`"/> + </many-to-one> + <list name="outputs" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`OUTPUTPORT_NODE_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOWNODE_OUTPUTS_IDX`"/> + <one-to-many entity-name="OutputPort"/> + </list> + <list name="inputs" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`INPUTPORT_NODE_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOWNODE_INPUTS_IDX`"/> + <one-to-many entity-name="InputPort"/> + </list> + <property name="isStart" lazy="false" insert="true" update="true" not-null="true" unique="false" type="boolean"> + <column not-null="true" unique="false" name="`ISSTART`"/> + </property> + <property name="isFinish" lazy="false" insert="true" update="true" not-null="true" unique="false" type="boolean"> + <column not-null="true" unique="false" name="`ISFINISH`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.EdgeImpl" entity-name="Edge" abstract="false" lazy="false" extends="WorkflowElement" table="`EDGE`"> + <meta attribute="eclassName" inherit="false">Edge</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWELEMENT_ID`"/> + </key> + <many-to-one name="workflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="EDGE_WORKFLOW" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`EDGE_WORKFLOW_ID`"/> + </many-to-one> + <many-to-one name="target" entity-name="InputPort" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="EDGE_TARGET" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`EDGE_TARGET_ID`"/> + </many-to-one> + <many-to-one name="source" entity-name="OutputPort" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="EDGE_SOURCE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`EDGE_SOURCE_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.PortImpl" entity-name="Port" abstract="true" lazy="false" extends="WorkflowElement" table="`PORT`"> + <meta attribute="eclassName" inherit="false">Port</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWELEMENT_ID`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.InputPortImpl" entity-name="InputPort" abstract="false" lazy="false" extends="Port" table="`INPUTPORT`"> + <meta attribute="eclassName" inherit="false">InputPort</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`PORT_ID`"/> + </key> + <many-to-one name="node" entity-name="WorkflowNode" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="INPUTPORT_NODE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`INPUTPORT_NODE_ID`"/> + </many-to-one> + <list name="edges" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`EDGE_TARGET_ID`" unique="false"/> + </key> + <list-index column="`INPUTPORT_EDGES_IDX`"/> + <one-to-many entity-name="Edge"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.OutputPortImpl" entity-name="OutputPort" abstract="false" lazy="false" extends="Port" table="`OUTPUTPORT`"> + <meta attribute="eclassName" inherit="false">OutputPort</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`PORT_ID`"/> + </key> + <many-to-one name="node" entity-name="WorkflowNode" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="OUTPUTPORT_NODE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`OUTPUTPORT_NODE_ID`"/> + </many-to-one> + <list name="edges" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`EDGE_SOURCE_ID`" unique="false"/> + </key> + <list-index column="`OUTPUTPORT_EDGES_IDX`"/> + <one-to-many entity-name="Edge"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.FaultImpl" entity-name="Fault" abstract="false" lazy="false" extends="OutputPort" table="`FAULT`"> + <meta attribute="eclassName" inherit="false">Fault</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`OUTPUTPORT_ID`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.CompoundTaskImpl" entity-name="CompoundTask" abstract="false" lazy="false" extends="WorkflowNode" table="`COMPOUNDTASK`"> + <meta attribute="eclassName" inherit="false">CompoundTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWNODE_ID`"/> + </key> + <many-to-one name="subworkflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="COMPOUNDTASK_SUBWORKFLOW" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`WORKFLOW_SUBWORKFLOW_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.TransformationTaskImpl" entity-name="TransformationTask" abstract="false" lazy="false" extends="WorkflowNode" table="`TRANSFORMATIONTASK`"> + <meta attribute="eclassName" inherit="false">TransformationTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWNODE_ID`"/> + </key> + <property name="transformExpression" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TRANSFORMEXPRESSION`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.ConditionalTaskImpl" entity-name="ConditionalTask" abstract="false" lazy="false" extends="WorkflowNode" table="`CONDITIONALTASK`"> + <meta attribute="eclassName" inherit="false">ConditionalTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWNODE_ID`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.LoopTaskImpl" entity-name="LoopTask" abstract="false" lazy="false" extends="CompoundTask" table="`LOOPTASK`"> + <meta attribute="eclassName" inherit="false">LoopTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`COMPOUNDTASK_ID`"/> + </key> + <property name="whileCondition" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`WHILECONDITION`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.ConditionalOutputPortImpl" entity-name="ConditionalOutputPort" abstract="false" lazy="false" extends="OutputPort" table="`CONDITIONALOUTPUTPORT`"> + <meta attribute="eclassName" inherit="false">ConditionalOutputPort</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`OUTPUTPORT_ID`"/> + </key> + <property name="condition" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CONDITION`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.CommentImpl" entity-name="Comment" abstract="false" lazy="false" extends="WorkflowElement" table="`COMMENT`"> + <meta attribute="eclassName" inherit="false">Comment</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWELEMENT_ID`"/> + </key> + <many-to-one name="workflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="COMMENT_WORKFLOW" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`COMMENT_WORKFLOW_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.TaskImpl" entity-name="Task" abstract="false" lazy="false" extends="WorkflowNode" table="`TASK`"> + <meta attribute="eclassName" inherit="false">Task</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <key> + <column name="`WORKFLOWNODE_ID`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/WorkFlowAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/WorkFlowAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..9238116ba --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/WorkFlowAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,180 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.WorkflowElementImpl" entity-name="WorkflowElement" abstract="true" lazy="false" discriminator-value="WorkflowElement" table="`WORKFLOWELEMENT`"> + <meta attribute="eclassName" inherit="false">WorkflowElement</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <id name="id" type="java.lang.String"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WORKFLOWELEMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + <property name="x" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`X`"/> + </property> + <property name="y" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`Y`"/> + </property> + <property name="width" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`WIDTH`"/> + </property> + <property name="height" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`HEIGHT`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.WorkflowImpl" entity-name="Workflow" abstract="false" lazy="false" extends="WorkflowElement" discriminator-value="Workflow"> + <meta attribute="eclassName" inherit="false">Workflow</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <list name="nodes" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`WORKFLOWNODE_WORKFLOW_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOW_NODES_IDX`"/> + <one-to-many entity-name="WorkflowNode"/> + </list> + <list name="edges" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`EDGE_WORKFLOW_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOW_EDGES_IDX`"/> + <one-to-many entity-name="Edge"/> + </list> + <list name="comments" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`COMMENT_WORKFLOW_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOW_COMMENTS_IDX`"/> + <one-to-many entity-name="Comment"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.WorkflowNodeImpl" entity-name="WorkflowNode" abstract="true" lazy="false" extends="WorkflowElement" discriminator-value="WorkflowNode"> + <meta attribute="eclassName" inherit="false">WorkflowNode</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <many-to-one name="workflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WORKFLOWNODE_WORKFLOW" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`WORKFLOWNODE_WORKFLOW_ID`"/> + </many-to-one> + <list name="outputs" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`OUTPUTPORT_NODE_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOWNODE_OUTPUTS_IDX`"/> + <one-to-many entity-name="OutputPort"/> + </list> + <list name="inputs" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`INPUTPORT_NODE_ID`" unique="false"/> + </key> + <list-index column="`WORKFLOWNODE_INPUTS_IDX`"/> + <one-to-many entity-name="InputPort"/> + </list> + <property name="isStart" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`ISSTART`"/> + </property> + <property name="isFinish" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`ISFINISH`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.EdgeImpl" entity-name="Edge" abstract="false" lazy="false" extends="WorkflowElement" discriminator-value="Edge"> + <meta attribute="eclassName" inherit="false">Edge</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <many-to-one name="workflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="EDGE_WORKFLOW" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`EDGE_WORKFLOW_ID`"/> + </many-to-one> + <many-to-one name="target" entity-name="InputPort" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="EDGE_TARGET" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`EDGE_TARGET_ID`"/> + </many-to-one> + <many-to-one name="source" entity-name="OutputPort" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="EDGE_SOURCE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`EDGE_SOURCE_ID`"/> + </many-to-one> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.PortImpl" entity-name="Port" abstract="true" lazy="false" extends="WorkflowElement" discriminator-value="Port"> + <meta attribute="eclassName" inherit="false">Port</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.InputPortImpl" entity-name="InputPort" abstract="false" lazy="false" extends="Port" discriminator-value="InputPort"> + <meta attribute="eclassName" inherit="false">InputPort</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <many-to-one name="node" entity-name="WorkflowNode" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="INPUTPORT_NODE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`INPUTPORT_NODE_ID`"/> + </many-to-one> + <list name="edges" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`EDGE_TARGET_ID`" unique="false"/> + </key> + <list-index column="`INPUTPORT_EDGES_IDX`"/> + <one-to-many entity-name="Edge"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.OutputPortImpl" entity-name="OutputPort" abstract="false" lazy="false" extends="Port" discriminator-value="OutputPort"> + <meta attribute="eclassName" inherit="false">OutputPort</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <many-to-one name="node" entity-name="WorkflowNode" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="OUTPUTPORT_NODE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`OUTPUTPORT_NODE_ID`"/> + </many-to-one> + <list name="edges" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`EDGE_SOURCE_ID`" unique="false"/> + </key> + <list-index column="`OUTPUTPORT_EDGES_IDX`"/> + <one-to-many entity-name="Edge"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.FaultImpl" entity-name="Fault" abstract="false" lazy="false" extends="OutputPort" discriminator-value="Fault"> + <meta attribute="eclassName" inherit="false">Fault</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.CompoundTaskImpl" entity-name="CompoundTask" abstract="false" lazy="false" extends="WorkflowNode" discriminator-value="CompoundTask"> + <meta attribute="eclassName" inherit="false">CompoundTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <many-to-one name="subworkflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="COMPOUNDTASK_SUBWORKFLOW" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WORKFLOW_SUBWORKFLOW_ID`"/> + </many-to-one> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.TransformationTaskImpl" entity-name="TransformationTask" abstract="false" lazy="false" extends="WorkflowNode" discriminator-value="TransformationTask"> + <meta attribute="eclassName" inherit="false">TransformationTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <property name="transformExpression" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TRANSFORMEXPRESSION`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.ConditionalTaskImpl" entity-name="ConditionalTask" abstract="false" lazy="false" extends="WorkflowNode" discriminator-value="ConditionalTask"> + <meta attribute="eclassName" inherit="false">ConditionalTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.LoopTaskImpl" entity-name="LoopTask" abstract="false" lazy="false" extends="CompoundTask" discriminator-value="LoopTask"> + <meta attribute="eclassName" inherit="false">LoopTask</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <property name="whileCondition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`WHILECONDITION`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.ConditionalOutputPortImpl" entity-name="ConditionalOutputPort" abstract="false" lazy="false" extends="OutputPort" discriminator-value="ConditionalOutputPort"> + <meta attribute="eclassName" inherit="false">ConditionalOutputPort</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <property name="condition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CONDITION`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.CommentImpl" entity-name="Comment" abstract="false" lazy="false" extends="WorkflowElement" discriminator-value="Comment"> + <meta attribute="eclassName" inherit="false">Comment</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + <many-to-one name="workflow" entity-name="Workflow" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="COMMENT_WORKFLOW" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`COMMENT_WORKFLOW_ID`"/> + </many-to-one> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.sample.workflow.impl.TaskImpl" entity-name="Task" abstract="false" lazy="false" extends="WorkflowNode" discriminator-value="Task"> + <meta attribute="eclassName" inherit="false">Task</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/workflow</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DateTimeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DateTimeAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..8527fab68 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DateTimeAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,25 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.datetime.impl.TestDateImpl" entity-name="TestDate" abstract="false" lazy="false" table="`TESTDATE`"> + <meta attribute="eclassName" inherit="false">TestDate</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/datetime</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="date" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`DATE`"/> + </property> + <property name="datetime" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDateTime"> + <column not-null="true" unique="false" name="`DATETIME`"/> + </property> + <property name="time" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDateTime"> + <column not-null="true" unique="false" name="`TIME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DateTimeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DateTimeAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..be0edfaff --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DateTimeAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.datetime.impl.TestDateImpl" entity-name="TestDate" abstract="false" lazy="false" discriminator-value="TestDate" table="`TESTDATE`"> + <meta attribute="eclassName" inherit="false">TestDate</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/datetime</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTDATEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="date" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="true" unique="false" name="`DATE`"/> + </property> + <property name="datetime" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDateTime"> + <column not-null="true" unique="false" name="`DATETIME`"/> + </property> + <property name="time" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDateTime"> + <column not-null="true" unique="false" name="`TIME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DocumentRootAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DocumentRootAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..a2bc0f91c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DocumentRootAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,70 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl" entity-name="ComplexType" abstract="false" lazy="false" table="`COMPLEXTYPE`"> + <meta attribute="eclassName" inherit="false">ComplexType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="test" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl" entity-name="documentroot.DocumentRoot" abstract="false" lazy="false" table="`DOCUMENTROOT_DOCUMENTROOT`"> + <meta attribute="eclassName" inherit="false">DocumentRoot</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`DOCUMENTROOT_DOCUMENTROOT_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DOCUMENTROOT_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`DOCUMENTROOT_MIXED_IDX`"/> + <one-to-many entity-name="DocumentRoot_mixed"/> + </list> + </class> + <class entity-name="DocumentRoot_mixed" lazy="false" table="`DOCUMENTROOT_MIXED`"> + <meta attribute="featureMap" inherit="false">documentroot.DocumentRoot</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <map name="xMLNSPrefixMap" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XMLNSPREFIXMAP_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="xSISchemaLocation" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XSISCHEMALOCATION_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <property name="otherTest" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_OTHERTEST`"/> + </property> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_TEST`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DocumentRootAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DocumentRootAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..d8260bb36 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DocumentRootAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,76 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl" entity-name="ComplexType" abstract="false" lazy="false" discriminator-value="ComplexType" table="`COMPLEXTYPE`"> + <meta attribute="eclassName" inherit="false">ComplexType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COMPLEXTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="test" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl" entity-name="documentroot.DocumentRoot" abstract="false" lazy="false" discriminator-value="documentroot.DocumentRoot" table="`DOCUMENTROOT_DOCUMENTROOT`"> + <meta attribute="eclassName" inherit="false">DocumentRoot</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DOCUMENTROOT_DOCUMENTROOTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`DOCUMENTROOT_DOCUMENTROOT_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DOCUMENTROOT_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`DOCUMENTROOT_MIXED_IDX`"/> + <one-to-many entity-name="DocumentRoot_mixed"/> + </list> + </class> + <class entity-name="DocumentRoot_mixed" lazy="false" table="`DOCUMENTROOT_MIXED`"> + <meta attribute="featureMap" inherit="false">documentroot.DocumentRoot</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <map name="xMLNSPrefixMap" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XMLNSPREFIXMAP_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="xSISchemaLocation" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_DOCUMENTROOT_XSISCHEMALOCATION_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <property name="otherTest" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_OTHERTEST`"/> + </property> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_TEST`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DurationAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DurationAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..100b17980 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DurationAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,25 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.duration.impl.DurationTestImpl" entity-name="DurationTest" abstract="false" lazy="false" table="`DURATIONTEST`"> + <meta attribute="eclassName" inherit="false">DurationTest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/duration</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDuration"> + <column not-null="false" unique="false" name="`DURATION`"/> + </property> + <list name="durations" table="`DURATIONTEST_DURATIONS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DURATIONTEST_DURATIONS_NAME`" unique="false"/> + </key> + <list-index column="`DURATIONTEST_DURATIONS_IDX`"/> + <element type="org.eclipse.emf.teneo.hibernate.mapping.XSDDuration"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DurationAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DurationAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..7bc73d82a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/DurationAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.duration.impl.DurationTestImpl" entity-name="DurationTest" abstract="false" lazy="false" discriminator-value="DurationTest" table="`DURATIONTEST`"> + <meta attribute="eclassName" inherit="false">DurationTest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/duration</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DURATIONTESTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDuration"> + <column not-null="false" unique="false" name="`DURATION`"/> + </property> + <list name="durations" table="`DURATIONTEST_DURATIONS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DURATIONTEST_DURATIONS_NAME`" unique="false"/> + </key> + <list-index column="`DURATIONTEST_DURATIONS_IDX`"/> + <element type="org.eclipse.emf.teneo.hibernate.mapping.XSDDuration"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/EcoreAttrsAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/EcoreAttrsAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c5113cb04 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/EcoreAttrsAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,127 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" table="`ELEMENT`"> + <meta attribute="eclassName" inherit="false">Element</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="nameMap" table="`ELEMENT_NAMEMAP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ELEMENT_NAMEMAP_E_ID`" unique="false"/> + </key> + <list-index column="`ELEMENT_NAMEMAP_IDX`"/> + <one-to-many entity-name="Element_nameMap"/> + </list> + </class> + <class entity-name="Element_nameMap" lazy="false" table="`ELEMENT_NAMEMAP`"> + <meta attribute="featureMap" inherit="false">Element</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="names" entity-name="NameList" lazy="false" cascade="all" foreign-key="ELEMENT_NAMES" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`NAMEMAP_NAMELIST_NAMES_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.FeatureImpl" entity-name="Feature" abstract="false" lazy="false" table="`FEATURE`"> + <meta attribute="eclassName" inherit="false">Feature</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="aMap" table="`FEATURE_AMAP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`FEATURE_AMAP_E_ID`" unique="false"/> + </key> + <list-index column="`FEATURE_AMAP_IDX`"/> + <one-to-many entity-name="Feature_aMap"/> + </list> + </class> + <class entity-name="Feature_aMap" lazy="false" table="`FEATURE_AMAP`"> + <meta attribute="featureMap" inherit="false">Feature</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AMAP_NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`AMAP_VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.MixedImpl" entity-name="Mixed" abstract="false" lazy="false" table="`MIXED`"> + <meta attribute="eclassName" inherit="false">Mixed</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`MIXED_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_MIXED_IDX`"/> + <one-to-many entity-name="Mixed_mixed"/> + </list> + </class> + <class entity-name="Mixed_mixed" lazy="false" table="`MIXED_MIXED`"> + <meta attribute="featureMap" inherit="false">Mixed</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`MIXED_VALUE`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.NameListImpl" entity-name="NameList" abstract="false" lazy="false" table="`NAMELIST`"> + <meta attribute="eclassName" inherit="false">NameList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="firstName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </property> + <property name="middleName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MIDDLENAME`"/> + </property> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/EcoreAttrsAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/EcoreAttrsAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..50e73c9fb --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/EcoreAttrsAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,139 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" discriminator-value="Element" table="`ELEMENT`"> + <meta attribute="eclassName" inherit="false">Element</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ELEMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="nameMap" table="`ELEMENT_NAMEMAP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ELEMENT_NAMEMAP_E_ID`" unique="false"/> + </key> + <list-index column="`ELEMENT_NAMEMAP_IDX`"/> + <one-to-many entity-name="Element_nameMap"/> + </list> + </class> + <class entity-name="Element_nameMap" lazy="false" table="`ELEMENT_NAMEMAP`"> + <meta attribute="featureMap" inherit="false">Element</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="names" entity-name="NameList" lazy="false" cascade="all" foreign-key="ELEMENT_NAMES" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`NAMEMAP_NAMELIST_NAMES_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.FeatureImpl" entity-name="Feature" abstract="false" lazy="false" discriminator-value="Feature" table="`FEATURE`"> + <meta attribute="eclassName" inherit="false">Feature</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FEATUREDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="aMap" table="`FEATURE_AMAP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`FEATURE_AMAP_E_ID`" unique="false"/> + </key> + <list-index column="`FEATURE_AMAP_IDX`"/> + <one-to-many entity-name="Feature_aMap"/> + </list> + </class> + <class entity-name="Feature_aMap" lazy="false" table="`FEATURE_AMAP`"> + <meta attribute="featureMap" inherit="false">Feature</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AMAP_NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`AMAP_VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.MixedImpl" entity-name="Mixed" abstract="false" lazy="false" discriminator-value="Mixed" table="`MIXED`"> + <meta attribute="eclassName" inherit="false">Mixed</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MIXEDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`MIXED_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_MIXED_IDX`"/> + <one-to-many entity-name="Mixed_mixed"/> + </list> + </class> + <class entity-name="Mixed_mixed" lazy="false" table="`MIXED_MIXED`"> + <meta attribute="featureMap" inherit="false">Mixed</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`MIXED_VALUE`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.ecoreattrs.impl.NameListImpl" entity-name="NameList" abstract="false" lazy="false" discriminator-value="NameList" table="`NAMELIST`"> + <meta attribute="eclassName" inherit="false">NameList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/ecoreattrs</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NAMELISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="firstName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`FIRSTNAME`"/> + </property> + <property name="middleName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`MIDDLENAME`"/> + </property> + <property name="lastName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LASTNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_e_o_hibernate.hbm.xml index 472a6b8f7..a17382f48 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_e_o_hibernate.hbm.xml @@ -6,7 +6,7 @@ <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</param> <param name="edatatype">USStateObject</param> </typedef> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`address`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> <meta attribute="eclassName" inherit="false">Address</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -17,16 +17,16 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`name`"/> + <column not-null="true" unique="false" name="`NAME`"/> </property> <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`street`"/> + <column not-null="true" unique="false" name="`STREET`"/> </property> <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`city`"/> + <column not-null="true" unique="false" name="`CITY`"/> </property> </class> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" table="`addresslist`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" table="`ADDRESSLIST`"> <meta attribute="eclassName" inherit="false">AddressList</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -37,43 +37,43 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`name`"/> + <column not-null="true" unique="false" name="`NAME`"/> </property> - <many-to-one name="firstAddress" entity-name="FirstAddressHolder" lazy="false" cascade="all" foreign-key="addresslist_firstaddress" insert="true" update="true" not-null="true" unique="true"> - <column not-null="true" unique="false" name="`firstaddressholder_firstaddress_e_id`"/> + <many-to-one name="firstAddress" entity-name="FirstAddressHolder" lazy="false" cascade="all" foreign-key="ADDRESSLIST_FIRSTADDRESS" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`FIRSTADDRESSHOLDER_FIRSTADDRESS_E_ID`"/> </many-to-one> - <list name="secondAddress" lazy="true" cascade="merge,persist,save-update,lock,refresh"> - <key update="true" foreign-key="addresslist_secondaddress"> - <column name="`addresslist_secondaddress_e_id`" not-null="false" unique="false"/> + <list name="secondAddress" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ADDRESSLIST_SECONDADDRESS"> + <column name="`ADDRESSLIST_SECONDADDRESS_E_ID`" unique="false"/> </key> - <list-index column="`addresslist_secondaddress_idx`"/> + <list-index column="`ADDRESSLIST_SECONDADDRESS_IDX`"/> <one-to-many entity-name="Address"/> </list> </class> - <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`ukaddress`"> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> <meta attribute="eclassName" inherit="false">UKAddress</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <key> - <column name="`address_e_id`"/> + <column name="`ADDRESS_E_ID`"/> </key> <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`postcode`"/> + <column not-null="true" unique="false" name="`POSTCODE`"/> </property> <property name="exportCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> - <column not-null="false" unique="false" name="`exportcode`"/> + <column not-null="false" unique="false" name="`EXPORTCODE`"/> </property> </joined-subclass> - <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`districtukaddress`"> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <key> - <column name="`ukaddress_e_id`"/> + <column name="`UKADDRESS_E_ID`"/> </key> <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`district`"/> + <column not-null="false" unique="false" name="`DISTRICT`"/> </property> </joined-subclass> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.FirstAddressHolderImpl" entity-name="FirstAddressHolder" abstract="false" lazy="false" table="`firstaddressholder`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.FirstAddressHolderImpl" entity-name="FirstAddressHolder" abstract="false" lazy="false" table="`FIRSTADDRESSHOLDER`"> <meta attribute="eclassName" inherit="false">FirstAddressHolder</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -83,15 +83,15 @@ <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> - <list name="value" lazy="true" cascade="merge,persist,save-update,lock,refresh"> - <key update="true" foreign-key="firstaddressholder_value"> - <column name="`firstaddressholder_value_e_id`" not-null="false" unique="false"/> + <list name="value" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="FIRSTADDRESSHOLDER_VALUE"> + <column name="`FIRSTADDRESSHOLDER_VALUE_E_ID`" unique="false"/> </key> - <list-index column="`firstaddressholder_value_idx`"/> + <list-index column="`FIRSTADDRESSHOLDER_VALUE_IDX`"/> <one-to-many entity-name="Address"/> </list> </class> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" table="`internationalprice`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" table="`INTERNATIONALPRICE`"> <meta attribute="eclassName" inherit="false">InternationalPrice</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -102,20 +102,20 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> - <column not-null="false" unique="false" name="`value`"/> + <column not-null="false" unique="false" name="`VALUE`"/> </property> <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`currency`"/> + <column not-null="false" unique="false" name="`CURRENCY`"/> </property> </class> - <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`unitedstatesaddress`"> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> <meta attribute="eclassName" inherit="false">USAddress</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <key> - <column name="`address_e_id`"/> + <column name="`ADDRESS_E_ID`"/> </key> <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> - <column not-null="false" unique="false" name="`state`"/> + <column not-null="false" unique="false" name="`STATE`"/> <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.USState</param> <param name="eclassifier">USState</param> @@ -123,7 +123,7 @@ </type> </property> <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> - <column not-null="false" unique="false" name="`zip`"/> + <column not-null="false" unique="false" name="`ZIP`"/> </property> </joined-subclass> </hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_h_o_hibernate.hbm.xml index 659f3d67b..dea7975c9 100755..100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ExtensionAction_hsqldb_h_o_hibernate.hbm.xml @@ -6,7 +6,7 @@ <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</param> <param name="edatatype">USStateObject</param> </typedef> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" discriminator-value="Address" table="`address`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" discriminator-value="Address" table="`ADDRESS`"> <meta attribute="eclassName" inherit="false">Address</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -14,22 +14,22 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="dtype" index="addressdtype" length="255" not-null="true"/> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`name`"/> + <column not-null="true" unique="false" name="`NAME`"/> </property> <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`street`"/> + <column not-null="true" unique="false" name="`STREET`"/> </property> <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`city`"/> + <column not-null="true" unique="false" name="`CITY`"/> </property> </class> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" discriminator-value="AddressList" table="`addresslist`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" discriminator-value="AddressList" table="`ADDRESSLIST`"> <meta attribute="eclassName" inherit="false">AddressList</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -37,22 +37,22 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="dtype" index="addresslistdtype" length="255" not-null="true"/> + <column name="`DTYPE`" index="ADDRESSLISTDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> - <column not-null="true" unique="false" name="`name`"/> + <column not-null="true" unique="false" name="`NAME`"/> </property> - <many-to-one name="firstAddress" entity-name="FirstAddressHolder" lazy="false" cascade="all" foreign-key="addresslist_firstaddress" insert="true" update="true" not-null="true" unique="true"> - <column not-null="true" unique="false" name="`firstaddressholder_firstaddress_e_id`"/> + <many-to-one name="firstAddress" entity-name="FirstAddressHolder" lazy="false" cascade="all" foreign-key="ADDRESSLIST_FIRSTADDRESS" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`FIRSTADDRESSHOLDER_FIRSTADDRESS_E_ID`"/> </many-to-one> - <list name="secondAddress" lazy="true" cascade="merge,persist,save-update,lock,refresh"> - <key update="true" foreign-key="addresslist_secondaddress"> - <column name="`addresslist_secondaddress_e_id`" not-null="false" unique="false"/> + <list name="secondAddress" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ADDRESSLIST_SECONDADDRESS"> + <column name="`ADDRESSLIST_SECONDADDRESS_E_ID`" unique="false"/> </key> - <list-index column="`addresslist_secondaddress_idx`"/> + <list-index column="`ADDRESSLIST_SECONDADDRESS_IDX`"/> <one-to-many entity-name="Address"/> </list> </class> @@ -60,20 +60,20 @@ <meta attribute="eclassName" inherit="false">UKAddress</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <property name="postcode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`postcode`"/> + <column not-null="false" unique="false" name="`POSTCODE`"/> </property> <property name="exportCode" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> - <column not-null="false" unique="false" name="`exportcode`"/> + <column not-null="false" unique="false" name="`EXPORTCODE`"/> </property> </subclass> <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" discriminator-value="DistrictUKAddress"> <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`district`"/> + <column not-null="false" unique="false" name="`DISTRICT`"/> </property> </subclass> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.FirstAddressHolderImpl" entity-name="FirstAddressHolder" abstract="false" lazy="false" discriminator-value="FirstAddressHolder" table="`firstaddressholder`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.FirstAddressHolderImpl" entity-name="FirstAddressHolder" abstract="false" lazy="false" discriminator-value="FirstAddressHolder" table="`FIRSTADDRESSHOLDER`"> <meta attribute="eclassName" inherit="false">FirstAddressHolder</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -81,20 +81,20 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="dtype" index="firstaddressholderdtype" length="255" not-null="true"/> + <column name="`DTYPE`" index="FIRSTADDRESSHOLDERDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> - <list name="value" lazy="true" cascade="merge,persist,save-update,lock,refresh"> - <key update="true" foreign-key="firstaddressholder_value"> - <column name="`firstaddressholder_value_e_id`" not-null="false" unique="false"/> + <list name="value" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="FIRSTADDRESSHOLDER_VALUE"> + <column name="`FIRSTADDRESSHOLDER_VALUE_E_ID`" unique="false"/> </key> - <list-index column="`firstaddressholder_value_idx`"/> + <list-index column="`FIRSTADDRESSHOLDER_VALUE_IDX`"/> <one-to-many entity-name="Address"/> </list> </class> - <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" discriminator-value="InternationalPrice" table="`internationalprice`"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" discriminator-value="InternationalPrice" table="`INTERNATIONALPRICE`"> <meta attribute="eclassName" inherit="false">InternationalPrice</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> @@ -102,23 +102,23 @@ <generator class="native"/> </id> <discriminator type="string"> - <column name="dtype" index="internationalpricedtype" length="255" not-null="true"/> + <column name="`DTYPE`" index="INTERNATIONALPRICEDTYPE" length="255" not-null="true"/> </discriminator> <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> - <column not-null="false" unique="false" name="`value`"/> + <column not-null="false" unique="false" name="`VALUE`"/> </property> <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`currency`"/> + <column not-null="false" unique="false" name="`CURRENCY`"/> </property> </class> <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"> <meta attribute="eclassName" inherit="false">USAddress</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension</meta> <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> - <column not-null="false" unique="false" name="`state`"/> + <column not-null="false" unique="false" name="`STATE`"/> <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.USState</param> <param name="eclassifier">USState</param> @@ -126,7 +126,7 @@ </type> </property> <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> - <column not-null="false" unique="false" name="`zip`"/> + <column not-null="false" unique="false" name="`ZIP`"/> </property> </subclass> </hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/GroupAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/GroupAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ec3fad4e8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/GroupAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,156 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`ADDRESS_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ADDRESS_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESS_GROUP_IDX`"/> + <one-to-many entity-name="Address_group"/> + </list> + </class> + <class entity-name="Address_group" lazy="false" table="`ADDRESS_GROUP`"> + <meta attribute="featureMap" inherit="false">Address</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_NAME`"/> + </property> + <property name="longName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_LONGNAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressGroupImpl" entity-name="AddressGroup" abstract="false" lazy="false" table="`ADDRESSGROUP`"> + <meta attribute="eclassName" inherit="false">AddressGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="groupName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`GROUPNAME`"/> + </property> + <many-to-one name="shipTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSGROUP_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <many-to-one name="billTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSGROUP_BILLTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_BILLTO_E_ID`"/> + </many-to-one> + <property name="simpleAddress" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SIMPLEADDRESS`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" table="`ADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">AddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="groupName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`GROUPNAME`"/> + </property> + <list name="addrs" table="`ADDRESSLIST_ADDRS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ADDRESSLIST_ADDRS_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESSLIST_ADDRS_IDX`"/> + <one-to-many entity-name="AddressList_addrs"/> + </list> + </class> + <class entity-name="AddressList_addrs" lazy="false" table="`ADDRESSLIST_ADDRS`"> + <meta attribute="featureMap" inherit="false">AddressList</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="shipTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSLIST_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRS_ADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <many-to-one name="billTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSLIST_BILLTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRS_ADDRESS_BILLTO_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllMapTypeImpl" entity-name="SimpleAllMapType" abstract="false" lazy="false" table="`SIMPLEALLMAPTYPE`"> + <meta attribute="eclassName" inherit="false">SimpleAllMapType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="allMap" table="`SIMPLEALLMAPTYPE_ALLMAP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLEALLMAPTYPE_ALLMAP_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLEALLMAPTYPE_ALLMAP_IDX`"/> + <one-to-many entity-name="SimpleAllMapType_allMap"/> + </list> + </class> + <class entity-name="SimpleAllMapType_allMap" lazy="false" table="`SIMPLEALLMAPTYPE_ALLMAP`"> + <meta attribute="featureMap" inherit="false">SimpleAllMapType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="aaa" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ALLMAP_AAA`"/> + </property> + <property name="bbb" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ALLMAP_BBB`"/> + </property> + <property name="ccc" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ALLMAP_CCC`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllTypeImpl" entity-name="SimpleAllType" abstract="false" lazy="false" table="`SIMPLEALLTYPE`"> + <meta attribute="eclassName" inherit="false">SimpleAllType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="aaa" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AAA`"/> + </property> + <property name="bbb" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BBB`"/> + </property> + <property name="ccc" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CCC`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/GroupAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/GroupAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..51cc6cb5c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/GroupAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,171 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="group" table="`ADDRESS_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ADDRESS_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESS_GROUP_IDX`"/> + <one-to-many entity-name="Address_group"/> + </list> + </class> + <class entity-name="Address_group" lazy="false" table="`ADDRESS_GROUP`"> + <meta attribute="featureMap" inherit="false">Address</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_NAME`"/> + </property> + <property name="longName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_LONGNAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressGroupImpl" entity-name="AddressGroup" abstract="false" lazy="false" discriminator-value="AddressGroup" table="`ADDRESSGROUP`"> + <meta attribute="eclassName" inherit="false">AddressGroup</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSGROUPDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="groupName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`GROUPNAME`"/> + </property> + <many-to-one name="shipTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSGROUP_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <many-to-one name="billTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSGROUP_BILLTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRESS_BILLTO_E_ID`"/> + </many-to-one> + <property name="simpleAddress" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SIMPLEADDRESS`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" discriminator-value="AddressList" table="`ADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">AddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="groupName" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`GROUPNAME`"/> + </property> + <list name="addrs" table="`ADDRESSLIST_ADDRS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ADDRESSLIST_ADDRS_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESSLIST_ADDRS_IDX`"/> + <one-to-many entity-name="AddressList_addrs"/> + </list> + </class> + <class entity-name="AddressList_addrs" lazy="false" table="`ADDRESSLIST_ADDRS`"> + <meta attribute="featureMap" inherit="false">AddressList</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="shipTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSLIST_SHIPTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRS_ADDRESS_SHIPTO_E_ID`"/> + </many-to-one> + <many-to-one name="billTo" entity-name="Address" lazy="false" cascade="all" foreign-key="ADDRESSLIST_BILLTO" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ADDRS_ADDRESS_BILLTO_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllMapTypeImpl" entity-name="SimpleAllMapType" abstract="false" lazy="false" discriminator-value="SimpleAllMapType" table="`SIMPLEALLMAPTYPE`"> + <meta attribute="eclassName" inherit="false">SimpleAllMapType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLEALLMAPTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="allMap" table="`SIMPLEALLMAPTYPE_ALLMAP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLEALLMAPTYPE_ALLMAP_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLEALLMAPTYPE_ALLMAP_IDX`"/> + <one-to-many entity-name="SimpleAllMapType_allMap"/> + </list> + </class> + <class entity-name="SimpleAllMapType_allMap" lazy="false" table="`SIMPLEALLMAPTYPE_ALLMAP`"> + <meta attribute="featureMap" inherit="false">SimpleAllMapType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="aaa" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ALLMAP_AAA`"/> + </property> + <property name="bbb" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ALLMAP_BBB`"/> + </property> + <property name="ccc" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ALLMAP_CCC`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.groupall.impl.SimpleAllTypeImpl" entity-name="SimpleAllType" abstract="false" lazy="false" discriminator-value="SimpleAllType" table="`SIMPLEALLTYPE`"> + <meta attribute="eclassName" inherit="false">SimpleAllType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/groupall</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLEALLTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="aaa" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`AAA`"/> + </property> + <property name="bbb" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`BBB`"/> + </property> + <property name="ccc" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CCC`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ListAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ListAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e675fea1d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ListAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,40 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="list.SixStatesList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">SixStatesList</param> + </typedef> + <typedef name="list.StateList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StateList</param> + </typedef> + <typedef name="list.StringList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StringList</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.list.impl.statesByCountryImpl" entity-name="statesByCountry" abstract="false" lazy="false" table="`STATESBYCOUNTRY`"> + <meta attribute="eclassName" inherit="false">statesByCountry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="country" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`COUNTRY`"/> + </property> + <property name="index" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`INDEX`"/> + </property> + <property name="allStates" lazy="false" insert="true" update="true" not-null="true" unique="false" type="list.StateList"> + <column not-null="true" unique="false" name="`ALLSTATES`"/> + </property> + <property name="sixImportantStates" lazy="false" insert="true" update="true" not-null="true" unique="false" type="list.SixStatesList"> + <column not-null="true" unique="false" name="`SIXIMPORTANTSTATES`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ListAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ListAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f3daa38ff --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ListAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,43 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="list.SixStatesList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">SixStatesList</param> + </typedef> + <typedef name="list.StateList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StateList</param> + </typedef> + <typedef name="list.StringList" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</param> + <param name="edatatype">StringList</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.list.impl.statesByCountryImpl" entity-name="statesByCountry" abstract="false" lazy="false" discriminator-value="statesByCountry" table="`STATESBYCOUNTRY`"> + <meta attribute="eclassName" inherit="false">statesByCountry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/list</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STATESBYCOUNTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="country" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`COUNTRY`"/> + </property> + <property name="index" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`INDEX`"/> + </property> + <property name="allStates" lazy="false" insert="true" update="true" not-null="true" unique="false" type="list.StateList"> + <column not-null="true" unique="false" name="`ALLSTATES`"/> + </property> + <property name="sixImportantStates" lazy="false" insert="true" update="true" not-null="true" unique="false" type="list.SixStatesList"> + <column not-null="true" unique="false" name="`SIXIMPORTANTSTATES`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/MixedAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/MixedAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..71f12da13 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/MixedAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,82 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.LetterBodyTypeImpl" entity-name="LetterBodyType" abstract="false" lazy="false" table="`LETTERBODYTYPE`"> + <meta attribute="eclassName" inherit="false">LetterBodyType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/mixed</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`LETTERBODYTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LETTERBODYTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`LETTERBODYTYPE_MIXED_IDX`"/> + <one-to-many entity-name="LetterBodyType_mixed"/> + </list> + </class> + <class entity-name="LetterBodyType_mixed" lazy="false" table="`LETTERBODYTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">LetterBodyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="salutation" entity-name="SalutationType" lazy="false" cascade="all" foreign-key="LETTERBODYTYPE_SALUTATION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_SALUTATIONTYPE_SALUTATION_E_ID`"/> + </many-to-one> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MIXED_QUANTITY`"/> + </property> + <property name="productName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PRODUCTNAME`"/> + </property> + <property name="shipDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`MIXED_SHIPDATE`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.SalutationTypeImpl" entity-name="SalutationType" abstract="false" lazy="false" table="`SALUTATIONTYPE`"> + <meta attribute="eclassName" inherit="false">SalutationType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/mixed</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`SALUTATIONTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SALUTATIONTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`SALUTATIONTYPE_MIXED_IDX`"/> + <one-to-many entity-name="SalutationType_mixed"/> + </list> + </class> + <class entity-name="SalutationType_mixed" lazy="false" table="`SALUTATIONTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">SalutationType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_NAME`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/MixedAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/MixedAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..bf4543872 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/MixedAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,88 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.LetterBodyTypeImpl" entity-name="LetterBodyType" abstract="false" lazy="false" discriminator-value="LetterBodyType" table="`LETTERBODYTYPE`"> + <meta attribute="eclassName" inherit="false">LetterBodyType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/mixed</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LETTERBODYTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`LETTERBODYTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`LETTERBODYTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`LETTERBODYTYPE_MIXED_IDX`"/> + <one-to-many entity-name="LetterBodyType_mixed"/> + </list> + </class> + <class entity-name="LetterBodyType_mixed" lazy="false" table="`LETTERBODYTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">LetterBodyType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="salutation" entity-name="SalutationType" lazy="false" cascade="all" foreign-key="LETTERBODYTYPE_SALUTATION" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_SALUTATIONTYPE_SALUTATION_E_ID`"/> + </many-to-one> + <property name="quantity" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MIXED_QUANTITY`"/> + </property> + <property name="productName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PRODUCTNAME`"/> + </property> + <property name="shipDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`MIXED_SHIPDATE`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.mixed.impl.SalutationTypeImpl" entity-name="SalutationType" abstract="false" lazy="false" discriminator-value="SalutationType" table="`SALUTATIONTYPE`"> + <meta attribute="eclassName" inherit="false">SalutationType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/mixed</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SALUTATIONTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`SALUTATIONTYPE_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SALUTATIONTYPE_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`SALUTATIONTYPE_MIXED_IDX`"/> + <one-to-many entity-name="SalutationType_mixed"/> + </list> + </class> + <class entity-name="SalutationType_mixed" lazy="false" table="`SALUTATIONTYPE_MIXED`"> + <meta attribute="featureMap" inherit="false">SalutationType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_NAME`"/> + </property> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ModelGroupAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ModelGroupAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..8246a5ad2 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ModelGroupAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,62 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.modelgroup.impl.OrderListImpl" entity-name="OrderList" abstract="false" lazy="false" table="`ORDERLIST`"> + <meta attribute="eclassName" inherit="false">OrderList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/modelgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="orders" table="`ORDERLIST_ORDERS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ORDERLIST_ORDERS_E_ID`" unique="false"/> + </key> + <list-index column="`ORDERLIST_ORDERS_IDX`"/> + <one-to-many entity-name="OrderList_orders"/> + </list> + </class> + <class entity-name="OrderList_orders" lazy="false" table="`ORDERLIST_ORDERS`"> + <meta attribute="featureMap" inherit="false">OrderList</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="preferredOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="ORDERLIST_PREFERREDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_PREFERREDORDERS_E_ID`"/> + </many-to-one> + <many-to-one name="standardOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="ORDERLIST_STANDARDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_STANDARDORDERS_E_ID`"/> + </many-to-one> + <property name="hardCopyOrderReference" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERREFERENCE`"/> + </property> + <property name="hardCopyOrderNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERNUMBER`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.modelgroup.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/modelgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="reference" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`REFERENCE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ModelGroupAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ModelGroupAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..2f8ad6847 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/ModelGroupAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,68 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.modelgroup.impl.OrderListImpl" entity-name="OrderList" abstract="false" lazy="false" discriminator-value="OrderList" table="`ORDERLIST`"> + <meta attribute="eclassName" inherit="false">OrderList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/modelgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ORDERLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="orders" table="`ORDERLIST_ORDERS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ORDERLIST_ORDERS_E_ID`" unique="false"/> + </key> + <list-index column="`ORDERLIST_ORDERS_IDX`"/> + <one-to-many entity-name="OrderList_orders"/> + </list> + </class> + <class entity-name="OrderList_orders" lazy="false" table="`ORDERLIST_ORDERS`"> + <meta attribute="featureMap" inherit="false">OrderList</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="preferredOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="ORDERLIST_PREFERREDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_PREFERREDORDERS_E_ID`"/> + </many-to-one> + <many-to-one name="standardOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="ORDERLIST_STANDARDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_STANDARDORDERS_E_ID`"/> + </many-to-one> + <property name="hardCopyOrderReference" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERREFERENCE`"/> + </property> + <property name="hardCopyOrderNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERNUMBER`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.modelgroup.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" discriminator-value="PurchaseOrder" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/modelgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PURCHASEORDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="reference" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`REFERENCE`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/NestedGroupAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/NestedGroupAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ed1186a4d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/NestedGroupAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,119 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.AImpl" entity-name="A" abstract="false" lazy="false" table="`A`"> + <meta attribute="eclassName" inherit="false">A</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/nestedgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="group" table="`A_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`A_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`A_GROUP_IDX`"/> + <one-to-many entity-name="A_group"/> + </list> + </class> + <class entity-name="A_group" lazy="false" table="`A_GROUP`"> + <meta attribute="featureMap" inherit="false">A</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="b" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_B`"/> + </property> + <many-to-one name="c" entity-name="CType" lazy="false" cascade="all" foreign-key="A_C" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_CTYPE_C_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.CTypeImpl" entity-name="CType" abstract="false" lazy="false" table="`CTYPE`"> + <meta attribute="eclassName" inherit="false">CType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/nestedgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="cname" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CNAME`"/> + </property> + <property name="cvalue" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`CVALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" table="`ELEMENT`"> + <meta attribute="eclassName" inherit="false">Element</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/nestedgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`ELEMENT_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ELEMENT_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`ELEMENT_MIXED_IDX`"/> + <one-to-many entity-name="Element_mixed"/> + </list> + </class> + <class entity-name="Element_mixed" lazy="false" table="`ELEMENT_MIXED`"> + <meta attribute="featureMap" inherit="false">Element</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_NAME`"/> + </property> + <list name="true" table="`MIXED_ELEMENT_TRUE`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_ELEMENT_TRUE_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_ELEMENT_TRUE_IDX`"/> + <one-to-many entity-name="Element_true"/> + </list> + <many-to-one name="c" entity-name="CType" lazy="false" cascade="all" foreign-key="ELEMENT_C" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_CTYPE_C_E_ID`"/> + </many-to-one> + <many-to-one name="recursive" entity-name="Element" lazy="false" cascade="all" foreign-key="ELEMENT_RECURSIVE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_ELEMENT_RECURSIVE_E_ID`"/> + </many-to-one> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="Element_true" lazy="false" table="`ELEMENT_TRUE`"> + <meta attribute="featureMap" inherit="false">Element</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="c" entity-name="CType" lazy="false" cascade="all" foreign-key="ELEMENT_C" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TRUE_CTYPE_C_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/NestedGroupAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/NestedGroupAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..62b475a6d --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/NestedGroupAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,128 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.AImpl" entity-name="A" abstract="false" lazy="false" discriminator-value="A" table="`A`"> + <meta attribute="eclassName" inherit="false">A</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/nestedgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="group" table="`A_GROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`A_GROUP_E_ID`" unique="false"/> + </key> + <list-index column="`A_GROUP_IDX`"/> + <one-to-many entity-name="A_group"/> + </list> + </class> + <class entity-name="A_group" lazy="false" table="`A_GROUP`"> + <meta attribute="featureMap" inherit="false">A</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="b" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUP_B`"/> + </property> + <many-to-one name="c" entity-name="CType" lazy="false" cascade="all" foreign-key="A_C" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`GROUP_CTYPE_C_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.CTypeImpl" entity-name="CType" abstract="false" lazy="false" discriminator-value="CType" table="`CTYPE`"> + <meta attribute="eclassName" inherit="false">CType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/nestedgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="cname" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CNAME`"/> + </property> + <property name="cvalue" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`CVALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.nestedgroup.impl.ElementImpl" entity-name="Element" abstract="false" lazy="false" discriminator-value="Element" table="`ELEMENT`"> + <meta attribute="eclassName" inherit="false">Element</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/nestedgroup</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ELEMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="mixed" table="`ELEMENT_MIXED`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ELEMENT_MIXED_E_ID`" unique="false"/> + </key> + <list-index column="`ELEMENT_MIXED_IDX`"/> + <one-to-many entity-name="Element_mixed"/> + </list> + </class> + <class entity-name="Element_mixed" lazy="false" table="`ELEMENT_MIXED`"> + <meta attribute="featureMap" inherit="false">Element</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_NAME`"/> + </property> + <list name="true" table="`MIXED_ELEMENT_TRUE`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MIXED_ELEMENT_TRUE_E_ID`" unique="false"/> + </key> + <list-index column="`MIXED_ELEMENT_TRUE_IDX`"/> + <one-to-many entity-name="Element_true"/> + </list> + <many-to-one name="c" entity-name="CType" lazy="false" cascade="all" foreign-key="ELEMENT_C" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_CTYPE_C_E_ID`"/> + </many-to-one> + <many-to-one name="recursive" entity-name="Element" lazy="false" cascade="all" foreign-key="ELEMENT_RECURSIVE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MIXED_ELEMENT_RECURSIVE_E_ID`"/> + </many-to-one> + <property name="fme_mixed_text" type="java.lang.String"/> + <property name="fme_mixed_cdata" type="java.lang.String"/> + <property name="fme_mixed_comment" type="java.lang.String"/> + </class> + <class entity-name="Element_true" lazy="false" table="`ELEMENT_TRUE`"> + <meta attribute="featureMap" inherit="false">Element</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="c" entity-name="CType" lazy="false" cascade="all" foreign-key="ELEMENT_C" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TRUE_CTYPE_C_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/QNameAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/QNameAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..730110947 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/QNameAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,29 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.qname.impl.MytestImpl" entity-name="Mytest" abstract="false" lazy="false" table="`MYTEST`"> + <meta attribute="eclassName" inherit="false">Mytest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/qname</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.QNameUserType"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="names" table="`MYTEST_NAMES`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MYTEST_NAMES_E_ID`" unique="false"/> + </key> + <list-index column="`MYTEST_NAMES_IDX`"/> + <element type="org.eclipse.emf.teneo.hibernate.mapping.QNameUserType"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/QNameAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/QNameAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0c5a6c230 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/QNameAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,32 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.qname.impl.MytestImpl" entity-name="Mytest" abstract="false" lazy="false" discriminator-value="Mytest" table="`MYTEST`"> + <meta attribute="eclassName" inherit="false">Mytest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/qname</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MYTESTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="description" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.QNameUserType"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="names" table="`MYTEST_NAMES`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MYTEST_NAMES_E_ID`" unique="false"/> + </key> + <list-index column="`MYTEST_NAMES_IDX`"/> + <element type="org.eclipse.emf.teneo.hibernate.mapping.QNameUserType"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/RestrictionAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/RestrictionAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1d7391a15 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/RestrictionAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.restriction.impl.XMLDeviantImpl" entity-name="XMLDeviant" abstract="false" lazy="false" table="`XMLDEVIANT`"> + <meta attribute="eclassName" inherit="false">XMLDeviant</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/restriction</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="numPosts" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`NUMPOSTS`"/> + </property> + <property name="signature" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SIGNATURE`"/> + </property> + <property name="email" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`EMAIL`"/> + </property> + <property name="firstSubscribed" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`FIRSTSUBSCRIBED`"/> + </property> + <property name="mailReader" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAILREADER`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.restriction.impl.MemberImpl" entity-name="Member" abstract="false" lazy="false" extends="XMLDeviant" table="`MEMBER`"> + <meta attribute="eclassName" inherit="false">Member</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/restriction</meta> + <key> + <column name="`XMLDEVIANT_E_ID`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/RestrictionAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/RestrictionAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b4af3225b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/RestrictionAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.restriction.impl.XMLDeviantImpl" entity-name="XMLDeviant" abstract="false" lazy="false" discriminator-value="XMLDeviant" table="`XMLDEVIANT`"> + <meta attribute="eclassName" inherit="false">XMLDeviant</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/restriction</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="XMLDEVIANTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="numPosts" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`NUMPOSTS`"/> + </property> + <property name="signature" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SIGNATURE`"/> + </property> + <property name="email" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`EMAIL`"/> + </property> + <property name="firstSubscribed" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate"> + <column not-null="false" unique="false" name="`FIRSTSUBSCRIBED`"/> + </property> + <property name="mailReader" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAILREADER`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.restriction.impl.MemberImpl" entity-name="Member" abstract="false" lazy="false" extends="XMLDeviant" discriminator-value="Member"> + <meta attribute="eclassName" inherit="false">Member</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/restriction</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimpleTypeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimpleTypeAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..fc50c1056 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimpleTypeAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,230 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="simpletypes.SimpleEnumObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">SimpleEnumObject</param> + </typedef> + <typedef name="simpletypes.StringArray" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">StringArray</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleListImpl" entity-name="SimpleList" abstract="false" lazy="false" table="`SIMPLELIST`"> + <meta attribute="eclassName" inherit="false">SimpleList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <list name="boo" table="`SIMPLELIST_BOO`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_BOO_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_BOO_IDX`"/> + <element type="boolean"/> + </list> + <list name="byt" table="`SIMPLELIST_BYT`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_BYT_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_BYT_IDX`"/> + <element type="java.lang.Byte"/> + </list> + <list name="doubl" table="`SIMPLELIST_DOUBL`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_DOUBL_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_DOUBL_IDX`"/> + <element type="java.lang.Double"/> + </list> + <list name="floa" table="`SIMPLELIST_FLOA`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_FLOA_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_FLOA_IDX`"/> + <element type="java.lang.Float"/> + </list> + <list name="inte" table="`SIMPLELIST_INTE`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_INTE_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_INTE_IDX`"/> + <element type="java.lang.Integer"/> + </list> + <list name="long" table="`LONGNUM`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_LONG_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_LONG_IDX`"/> + <element type="java.lang.Long"/> + </list> + <list name="shor" table="`SIMPLELIST_SHOR`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_SHOR_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_SHOR_IDX`"/> + <element type="short"/> + </list> + <list name="enu" table="`SIMPLELIST_ENU`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_ENU_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_ENU_IDX`"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.SimpleEnum</param> + <param name="eclassifier">SimpleEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + </type> + </element> + </list> + <list name="dat" table="`SIMPLELIST_DAT`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_DAT_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_DAT_IDX`"/> + <element type="timestamp"/> + </list> + <list name="limitedstring" table="`SIMPLELIST_LIMITEDSTRING`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_LIMITEDSTRING_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_LIMITEDSTRING_IDX`"/> + <element type="java.lang.String"/> + </list> + <list name="stri" table="`SIMPLELIST_STRI`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_STRI_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_STRI_IDX`"/> + <element type="java.lang.String"/> + </list> + <array name="intArray" table="`SIMPLELIST_INTARRAY`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_INTARRAY_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_INTARRAY_IDX`"/> + <element type="int"/> + </array> + <array name="doubleArray" table="`SIMPLELIST_DOUBLEARRAY`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_DOUBLEARRAY_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_DOUBLEARRAY_IDX`"/> + <element type="double"/> + </array> + <property name="stringArray" lazy="false" insert="true" update="true" not-null="true" unique="false" type="simpletypes.StringArray"> + <column not-null="true" unique="false" name="`STRINGARRAY`"/> + </property> + <array name="byteArray" table="`SIMPLELIST_BYTEARRAY`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_BYTEARRAY_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_BYTEARRAY_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeImpl" entity-name="SimpleType" abstract="false" lazy="false" table="`SIMPLETYPE`"> + <meta attribute="eclassName" inherit="false">SimpleType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <property name="boo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`BOO`"/> + </property> + <property name="byt" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`BYT`"/> + </property> + <property name="doubl" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`DOUBL`"/> + </property> + <property name="float" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`FLOAT`"/> + </property> + <property name="inte" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`INTE`"/> + </property> + <property name="lon" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`LON`"/> + </property> + <property name="shor" lazy="false" insert="true" update="true" not-null="false" unique="false" type="short"> + <column not-null="false" unique="false" name="`SHOR`"/> + </property> + <property name="enu" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`ENU`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.SimpleEnum</param> + <param name="eclassifier">SimpleEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + </type> + </property> + <property name="dat" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`DAT`"/> + </property> + <property name="limitedstring" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LIMITEDSTRING`" length="10"/> + </property> + <property name="limitedDecimal" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`LIMITEDDECIMAL`" precision="4" scale="1"/> + </property> + <property name="extraLimitedString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`EXTRALIMITEDSTRING`" length="5"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeObjectImpl" entity-name="SimpleTypeObject" abstract="false" lazy="false" table="`SIMPLETYPEOBJECT`"> + <meta attribute="eclassName" inherit="false">SimpleTypeObject</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <property name="boo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`BOO`"/> + </property> + <property name="byt" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Byte"> + <column not-null="false" unique="false" name="`BYT`"/> + </property> + <property name="doubl" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Double"> + <column not-null="false" unique="false" name="`DOUBL`"/> + </property> + <property name="float" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Float"> + <column not-null="false" unique="false" name="`FLOAT`"/> + </property> + <property name="inte" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Integer"> + <column not-null="false" unique="false" name="`INTE`"/> + </property> + <property name="lon" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`LON`"/> + </property> + <property name="shor" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Short"> + <column not-null="false" unique="false" name="`SHOR`"/> + </property> + <property name="enu" lazy="false" not-null="false" insert="true" update="true" unique="false" type="simpletypes.SimpleEnumObject"> + <column not-null="false" unique="false" name="`ENU`"/> + </property> + <property name="dat" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`DAT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimpleTypeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimpleTypeAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..dd8ceeb26 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimpleTypeAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,239 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="simpletypes.SimpleEnumObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">SimpleEnumObject</param> + </typedef> + <typedef name="simpletypes.StringArray" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + <param name="edatatype">StringArray</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleListImpl" entity-name="SimpleList" abstract="false" lazy="false" discriminator-value="SimpleList" table="`SIMPLELIST`"> + <meta attribute="eclassName" inherit="false">SimpleList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLELISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <list name="boo" table="`SIMPLELIST_BOO`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_BOO_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_BOO_IDX`"/> + <element type="boolean"/> + </list> + <list name="byt" table="`SIMPLELIST_BYT`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_BYT_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_BYT_IDX`"/> + <element type="java.lang.Byte"/> + </list> + <list name="doubl" table="`SIMPLELIST_DOUBL`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_DOUBL_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_DOUBL_IDX`"/> + <element type="java.lang.Double"/> + </list> + <list name="floa" table="`SIMPLELIST_FLOA`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_FLOA_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_FLOA_IDX`"/> + <element type="java.lang.Float"/> + </list> + <list name="inte" table="`SIMPLELIST_INTE`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_INTE_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_INTE_IDX`"/> + <element type="java.lang.Integer"/> + </list> + <list name="long" table="`LONGNUM`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_LONG_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_LONG_IDX`"/> + <element type="java.lang.Long"/> + </list> + <list name="shor" table="`SIMPLELIST_SHOR`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_SHOR_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_SHOR_IDX`"/> + <element type="short"/> + </list> + <list name="enu" table="`SIMPLELIST_ENU`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_ENU_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_ENU_IDX`"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.SimpleEnum</param> + <param name="eclassifier">SimpleEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + </type> + </element> + </list> + <list name="dat" table="`SIMPLELIST_DAT`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_DAT_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_DAT_IDX`"/> + <element type="timestamp"/> + </list> + <list name="limitedstring" table="`SIMPLELIST_LIMITEDSTRING`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_LIMITEDSTRING_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_LIMITEDSTRING_IDX`"/> + <element type="java.lang.String"/> + </list> + <list name="stri" table="`SIMPLELIST_STRI`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_STRI_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_STRI_IDX`"/> + <element type="java.lang.String"/> + </list> + <array name="intArray" table="`SIMPLELIST_INTARRAY`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_INTARRAY_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_INTARRAY_IDX`"/> + <element type="int"/> + </array> + <array name="doubleArray" table="`SIMPLELIST_DOUBLEARRAY`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_DOUBLEARRAY_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_DOUBLEARRAY_IDX`"/> + <element type="double"/> + </array> + <property name="stringArray" lazy="false" insert="true" update="true" not-null="true" unique="false" type="simpletypes.StringArray"> + <column not-null="true" unique="false" name="`STRINGARRAY`"/> + </property> + <array name="byteArray" table="`SIMPLELIST_BYTEARRAY`" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SIMPLELIST_BYTEARRAY_E_ID`" unique="false"/> + </key> + <list-index column="`SIMPLELIST_BYTEARRAY_IDX`"/> + <element type="byte"/> + </array> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeImpl" entity-name="SimpleType" abstract="false" lazy="false" discriminator-value="SimpleType" table="`SIMPLETYPE`"> + <meta attribute="eclassName" inherit="false">SimpleType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLETYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <property name="boo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`BOO`"/> + </property> + <property name="byt" lazy="false" insert="true" update="true" not-null="false" unique="false" type="byte"> + <column not-null="false" unique="false" name="`BYT`"/> + </property> + <property name="doubl" lazy="false" insert="true" update="true" not-null="false" unique="false" type="double"> + <column not-null="false" unique="false" name="`DOUBL`"/> + </property> + <property name="float" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float"> + <column not-null="false" unique="false" name="`FLOAT`"/> + </property> + <property name="inte" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`INTE`"/> + </property> + <property name="lon" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`LON`"/> + </property> + <property name="shor" lazy="false" insert="true" update="true" not-null="false" unique="false" type="short"> + <column not-null="false" unique="false" name="`SHOR`"/> + </property> + <property name="enu" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`ENU`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.SimpleEnum</param> + <param name="eclassifier">SimpleEnum</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</param> + </type> + </property> + <property name="dat" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp"> + <column not-null="true" unique="false" name="`DAT`"/> + </property> + <property name="limitedstring" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LIMITEDSTRING`" length="10"/> + </property> + <property name="limitedDecimal" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigDecimal"> + <column not-null="false" unique="false" name="`LIMITEDDECIMAL`" precision="4" scale="1"/> + </property> + <property name="extraLimitedString" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`EXTRALIMITEDSTRING`" length="5"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simpletypes.impl.SimpleTypeObjectImpl" entity-name="SimpleTypeObject" abstract="false" lazy="false" discriminator-value="SimpleTypeObject" table="`SIMPLETYPEOBJECT`"> + <meta attribute="eclassName" inherit="false">SimpleTypeObject</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/simpletypes</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLETYPEOBJECTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="code" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CODE`"/> + </property> + <property name="boo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Boolean"> + <column not-null="false" unique="false" name="`BOO`"/> + </property> + <property name="byt" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Byte"> + <column not-null="false" unique="false" name="`BYT`"/> + </property> + <property name="doubl" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Double"> + <column not-null="false" unique="false" name="`DOUBL`"/> + </property> + <property name="float" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Float"> + <column not-null="false" unique="false" name="`FLOAT`"/> + </property> + <property name="inte" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Integer"> + <column not-null="false" unique="false" name="`INTE`"/> + </property> + <property name="lon" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Long"> + <column not-null="false" unique="false" name="`LON`"/> + </property> + <property name="shor" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.Short"> + <column not-null="false" unique="false" name="`SHOR`"/> + </property> + <property name="enu" lazy="false" not-null="false" insert="true" update="true" unique="false" type="simpletypes.SimpleEnumObject"> + <column not-null="false" unique="false" name="`ENU`"/> + </property> + <property name="dat" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`DAT`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimplefeaturemapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimplefeaturemapAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..49103eb10 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimplefeaturemapAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,62 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/simplefeaturemap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.SupplierImpl" entity-name="Supplier" abstract="false" lazy="false" table="`SUPPLIER`"> + <meta attribute="eclassName" inherit="false">Supplier</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/simplefeaturemap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="orders" table="`SUPPLIER_ORDERS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SUPPLIER_ORDERS_E_ID`" unique="false"/> + </key> + <list-index column="`SUPPLIER_ORDERS_IDX`"/> + <one-to-many entity-name="Supplier_orders"/> + </list> + </class> + <class entity-name="Supplier_orders" lazy="false" table="`SUPPLIER_ORDERS`"> + <meta attribute="featureMap" inherit="false">Supplier</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="preferredOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="SUPPLIER_PREFERREDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_PREFERREDORDERS_E_ID`"/> + </many-to-one> + <many-to-one name="standardOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="SUPPLIER_STANDARDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_STANDARDORDERS_E_ID`"/> + </many-to-one> + <property name="hardCopyOrderReference" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERREFERENCE`"/> + </property> + <property name="hardCopyOrderNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERNUMBER`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimplefeaturemapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimplefeaturemapAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..324961d2c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SimplefeaturemapAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,68 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.PurchaseOrderImpl" entity-name="PurchaseOrder" abstract="false" lazy="false" discriminator-value="PurchaseOrder" table="`PURCHASEORDER`"> + <meta attribute="eclassName" inherit="false">PurchaseOrder</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/simplefeaturemap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PURCHASEORDERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.simplefeaturemap.impl.SupplierImpl" entity-name="Supplier" abstract="false" lazy="false" discriminator-value="Supplier" table="`SUPPLIER`"> + <meta attribute="eclassName" inherit="false">Supplier</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/simplefeaturemap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUPPLIERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="orders" table="`SUPPLIER_ORDERS`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`SUPPLIER_ORDERS_E_ID`" unique="false"/> + </key> + <list-index column="`SUPPLIER_ORDERS_IDX`"/> + <one-to-many entity-name="Supplier_orders"/> + </list> + </class> + <class entity-name="Supplier_orders" lazy="false" table="`SUPPLIER_ORDERS`"> + <meta attribute="featureMap" inherit="false">Supplier</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="preferredOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="SUPPLIER_PREFERREDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_PREFERREDORDERS_E_ID`"/> + </many-to-one> + <many-to-one name="standardOrders" entity-name="PurchaseOrder" lazy="false" cascade="all" foreign-key="SUPPLIER_STANDARDORDERS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ORDERS_PURCHASEORDER_STANDARDORDERS_E_ID`"/> + </many-to-one> + <property name="hardCopyOrderReference" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERREFERENCE`"/> + </property> + <property name="hardCopyOrderNumber" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ORDERS_HARDCOPYORDERNUMBER`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..8aa5f0570 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,124 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.ComplexNumberImpl" entity-name="ComplexNumber" abstract="false" lazy="false" table="`COMPLEXNUMBER`"> + <meta attribute="eclassName" inherit="false">ComplexNumber</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + <property name="unit" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`UNIT`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.EvenComplexNumberTypeImpl" entity-name="EvenComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" table="`EVENCOMPLEXNUMBERTYPE`"> + <meta attribute="eclassName" inherit="false">EvenComplexNumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <key> + <column name="`COMPLEXNUMBER_E_ID`"/> + </key> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.MultiNumberTypeImpl" entity-name="MultiNumberType" abstract="false" lazy="false" table="`MULTINUMBERTYPE`"> + <meta attribute="eclassName" inherit="false">MultiNumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="myComplexAbstractGroup" table="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="MultiNumberType_myComplexAbstractGroup"/> + </list> + </class> + <class entity-name="MultiNumberType_myComplexAbstractGroup" lazy="false" table="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">MultiNumberType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="myComplexAbstract" entity-name="ComplexNumber" lazy="false" cascade="all" foreign-key="MULTINUMBERTYPE_MYCOMPLEXABSTRACT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYCOMPLEXABSTRACTGROUP_COMPLEXNUMBER_MYCOMPLEXABSTRACT_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.NumberTypeImpl" entity-name="NumberType" abstract="false" lazy="false" table="`NUMBERTYPE`"> + <meta attribute="eclassName" inherit="false">NumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="mySimpleAbstractGroup" table="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="NumberType_mySimpleAbstractGroup"/> + </list> + <list name="myComplexAbstractGroup" table="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="NumberType_myComplexAbstractGroup"/> + </list> + </class> + <class entity-name="NumberType_mySimpleAbstractGroup" lazy="false" table="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">NumberType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="mySimpleAbstract" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MYSIMPLEABSTRACTGROUP_MYSIMPLEABSTRACT`"/> + </property> + </class> + <class entity-name="NumberType_myComplexAbstractGroup" lazy="false" table="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">NumberType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="myComplexAbstract" entity-name="ComplexNumber" lazy="false" cascade="all" foreign-key="NUMBERTYPE_MYCOMPLEXABSTRACT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYCOMPLEXABSTRACTGROUP_COMPLEXNUMBER_MYCOMPLEXABSTRACT_E_ID`"/> + </many-to-one> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.OddComplexNumberTypeImpl" entity-name="OddComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" table="`ODDCOMPLEXNUMBERTYPE`"> + <meta attribute="eclassName" inherit="false">OddComplexNumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <key> + <column name="`COMPLEXNUMBER_E_ID`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..bf39fd5f9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,127 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.ComplexNumberImpl" entity-name="ComplexNumber" abstract="false" lazy="false" discriminator-value="ComplexNumber" table="`COMPLEXNUMBER`"> + <meta attribute="eclassName" inherit="false">ComplexNumber</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COMPLEXNUMBERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigInteger"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + <property name="unit" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`UNIT`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.EvenComplexNumberTypeImpl" entity-name="EvenComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" discriminator-value="EvenComplexNumberType"> + <meta attribute="eclassName" inherit="false">EvenComplexNumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.MultiNumberTypeImpl" entity-name="MultiNumberType" abstract="false" lazy="false" discriminator-value="MultiNumberType" table="`MULTINUMBERTYPE`"> + <meta attribute="eclassName" inherit="false">MultiNumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MULTINUMBERTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="myComplexAbstractGroup" table="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="MultiNumberType_myComplexAbstractGroup"/> + </list> + </class> + <class entity-name="MultiNumberType_myComplexAbstractGroup" lazy="false" table="`MULTINUMBERTYPE_MYCOMPLEXABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">MultiNumberType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="myComplexAbstract" entity-name="ComplexNumber" lazy="false" cascade="all" foreign-key="MULTINUMBERTYPE_MYCOMPLEXABSTRACT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYCOMPLEXABSTRACTGROUP_COMPLEXNUMBER_MYCOMPLEXABSTRACT_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.NumberTypeImpl" entity-name="NumberType" abstract="false" lazy="false" discriminator-value="NumberType" table="`NUMBERTYPE`"> + <meta attribute="eclassName" inherit="false">NumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NUMBERTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="mySimpleAbstractGroup" table="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="NumberType_mySimpleAbstractGroup"/> + </list> + <list name="myComplexAbstractGroup" table="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="NumberType_myComplexAbstractGroup"/> + </list> + </class> + <class entity-name="NumberType_mySimpleAbstractGroup" lazy="false" table="`NUMBERTYPE_MYSIMPLEABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">NumberType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="mySimpleAbstract" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MYSIMPLEABSTRACTGROUP_MYSIMPLEABSTRACT`"/> + </property> + </class> + <class entity-name="NumberType_myComplexAbstractGroup" lazy="false" table="`NUMBERTYPE_MYCOMPLEXABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">NumberType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="myComplexAbstract" entity-name="ComplexNumber" lazy="false" cascade="all" foreign-key="NUMBERTYPE_MYCOMPLEXABSTRACT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYCOMPLEXABSTRACTGROUP_COMPLEXNUMBER_MYCOMPLEXABSTRACT_E_ID`"/> + </many-to-one> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitution.impl.OddComplexNumberTypeImpl" entity-name="OddComplexNumberType" abstract="false" lazy="false" extends="ComplexNumber" discriminator-value="OddComplexNumberType"> + <meta attribute="eclassName" inherit="false">OddComplexNumberType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitution</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionzvonAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionzvonAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3746e52b8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionzvonAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,84 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexAAAImpl" entity-name="ComplexAAA" abstract="false" lazy="false" table="`COMPLEXAAA`"> + <meta attribute="eclassName" inherit="false">ComplexAAA</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexEvenTypeImpl" entity-name="ComplexEvenType" abstract="false" lazy="false" extends="ComplexAAA" table="`COMPLEXEVENTYPE`"> + <meta attribute="eclassName" inherit="false">ComplexEvenType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + <key> + <column name="`COMPLEXAAA_E_ID`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexOddTypeImpl" entity-name="ComplexOddType" abstract="false" lazy="false" extends="ComplexAAA" table="`COMPLEXODDTYPE`"> + <meta attribute="eclassName" inherit="false">ComplexOddType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + <key> + <column name="`COMPLEXAAA_E_ID`"/> + </key> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.RootTypeImpl" entity-name="RootType" abstract="false" lazy="false" table="`ROOTTYPE`"> + <meta attribute="eclassName" inherit="false">RootType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="myAbstractGroup" table="`ROOTTYPE_MYABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROOTTYPE_MYABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ROOTTYPE_MYABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="RootType_myAbstractGroup"/> + </list> + <list name="myComplexAbstractGroup" table="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="RootType_myComplexAbstractGroup"/> + </list> + </class> + <class entity-name="RootType_myAbstractGroup" lazy="false" table="`ROOTTYPE_MYABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">RootType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="myAbstract" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MYABSTRACTGROUP_MYABSTRACT`"/> + </property> + </class> + <class entity-name="RootType_myComplexAbstractGroup" lazy="false" table="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">RootType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="myComplexAbstract" entity-name="ComplexAAA" lazy="false" cascade="all" foreign-key="ROOTTYPE_MYCOMPLEXABSTRACT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYCOMPLEXABSTRACTGROUP_COMPLEXAAA_MYCOMPLEXABSTRACT_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionzvonAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionzvonAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f2206ad00 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.schemaconstructs/SubstitutionzvonAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,84 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexAAAImpl" entity-name="ComplexAAA" abstract="false" lazy="false" discriminator-value="ComplexAAA" table="`COMPLEXAAA`"> + <meta attribute="eclassName" inherit="false">ComplexAAA</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COMPLEXAAADTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexEvenTypeImpl" entity-name="ComplexEvenType" abstract="false" lazy="false" extends="ComplexAAA" discriminator-value="ComplexEvenType"> + <meta attribute="eclassName" inherit="false">ComplexEvenType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.ComplexOddTypeImpl" entity-name="ComplexOddType" abstract="false" lazy="false" extends="ComplexAAA" discriminator-value="ComplexOddType"> + <meta attribute="eclassName" inherit="false">ComplexOddType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.substitutionzvon.impl.RootTypeImpl" entity-name="RootType" abstract="false" lazy="false" discriminator-value="RootType" table="`ROOTTYPE`"> + <meta attribute="eclassName" inherit="false">RootType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/substitutionzvon</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ROOTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="myAbstractGroup" table="`ROOTTYPE_MYABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROOTTYPE_MYABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ROOTTYPE_MYABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="RootType_myAbstractGroup"/> + </list> + <list name="myComplexAbstractGroup" table="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP_E_ID`" unique="false"/> + </key> + <list-index column="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP_IDX`"/> + <one-to-many entity-name="RootType_myComplexAbstractGroup"/> + </list> + </class> + <class entity-name="RootType_myAbstractGroup" lazy="false" table="`ROOTTYPE_MYABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">RootType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <property name="myAbstract" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`MYABSTRACTGROUP_MYABSTRACT`"/> + </property> + </class> + <class entity-name="RootType_myComplexAbstractGroup" lazy="false" table="`ROOTTYPE_MYCOMPLEXABSTRACTGROUP`"> + <meta attribute="featureMap" inherit="false">RootType</meta> + <id type="long"> + <generator class="native"/> + </id> + <version name="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="fme_feature" type="java.lang.String"/> + <many-to-one name="myComplexAbstract" entity-name="ComplexAAA" lazy="false" cascade="all" foreign-key="ROOTTYPE_MYCOMPLEXABSTRACT" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MYCOMPLEXABSTRACTGROUP_COMPLEXAAA_MYCOMPLEXABSTRACT_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractReferenceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractReferenceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..321319170 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractReferenceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,98 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="country" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ADDRESS_COUNTRY"> + <column name="`ADDRESS_COUNTRY_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESS_COUNTRY_IDX`"/> + <one-to-many entity-name="City"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.CityImpl" entity-name="City" abstract="true" lazy="false" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CITY_ADDRESS"> + <column name="`CITY_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`CITY_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_ADDRESS"> + <column name="`PERSON_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <key> + <column name="`ADDRESS_E_ID`"/> + </key> + <property name="state" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STATE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.USCityImpl" entity-name="USCity" abstract="false" lazy="false" extends="City" table="`USCITY`"> + <meta attribute="eclassName" inherit="false">USCity</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <key> + <column name="`CITY_E_ID`"/> + </key> + <property name="state" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STATE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.USOfficeAddressImpl" entity-name="USOfficeAddress" abstract="false" lazy="false" extends="USAddress" table="`USOFFICEADDRESS`"> + <meta attribute="eclassName" inherit="false">USOfficeAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <key> + <column name="`USADDRESS_E_ID`"/> + </key> + <property name="location" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`LOCATION`"/> + </property> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractReferenceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractReferenceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..d363efde3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractReferenceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,98 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="country" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ADDRESS_COUNTRY"> + <column name="`ADDRESS_COUNTRY_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESS_COUNTRY_IDX`"/> + <one-to-many entity-name="City"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.CityImpl" entity-name="City" abstract="true" lazy="false" discriminator-value="City" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CITY_ADDRESS"> + <column name="`CITY_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`CITY_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PERSON_ADDRESS"> + <column name="`PERSON_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`PERSON_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.USCityImpl" entity-name="USCity" abstract="false" lazy="false" extends="City" discriminator-value="USCity"> + <meta attribute="eclassName" inherit="false">USCity</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.abstractreference.impl.USOfficeAddressImpl" entity-name="USOfficeAddress" abstract="false" lazy="false" extends="USAddress" discriminator-value="USOfficeAddress"> + <meta attribute="eclassName" inherit="false">USOfficeAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/abstractreference</meta> + <property name="location" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LOCATION`"/> + </property> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractTopClassAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractTopClassAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ef16020d2 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractTopClassAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,151 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="abstractsuper.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/issues/abstractsuper</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="mypriceDISCRIMINATOR" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.abstractsuper.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/issues/abstractsuper</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" table="`SPECIFICCUSTOMER`"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`CUSTOMER_NAME`"/> + </key> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractTopClassAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractTopClassAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..de0a09ef1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/AbstractTopClassAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,157 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="abstractsuper.USStateObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/issues/abstractsuper</param> + <param name="edatatype">USStateObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.AddressImpl" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="street" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STREET`"/> + </property> + <property name="city" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`CITY`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.ContentListImpl" entity-name="ContentList" abstract="false" lazy="false" discriminator-value="ContentList" table="`CONTENTLIST`"> + <meta attribute="eclassName" inherit="false">ContentList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTENTLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_ADDRESS"> + <column name="`CONTENTLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + <list name="price" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="CONTENTLIST_PRICE"> + <column name="`CONTENTLIST_PRICE_NAME`" unique="false"/> + </key> + <list-index column="`CONTENTLIST_PRICE_IDX`"/> + <one-to-many entity-name="Price"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.UKAddressImpl" entity-name="UKAddress" abstract="false" lazy="false" extends="Address" table="`UKADDRESS`"> + <meta attribute="eclassName" inherit="false">UKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="postcode" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`POSTCODE`"/> + </property> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.DistrictUKAddressImpl" entity-name="DistrictUKAddress" abstract="false" lazy="false" extends="UKAddress" table="`DISTRICTUKADDRESS`"> + <meta attribute="eclassName" inherit="false">DistrictUKAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`UKADDRESS_NAME`"/> + </key> + <property name="district" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DISTRICT`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.PriceImpl" entity-name="Price" abstract="false" lazy="false" discriminator-value="myPrice" table="`MYPRICE`"> + <meta attribute="eclassName" inherit="false">Price</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DISCRIMINATOR`" index="mypriceDISCRIMINATOR" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.math.BigDecimal"> + <column not-null="true" unique="false" name="`VALUE`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.InternationalPriceImpl" entity-name="InternationalPrice" abstract="false" lazy="false" extends="Price" discriminator-value="myInternationalPrice"> + <meta attribute="eclassName" inherit="false">InternationalPrice</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <property name="currency" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CURRENCY`"/> + </property> + </subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`UNITEDSTATESADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <key> + <column name="`ADDRESS_NAME`"/> + </key> + <property name="state" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`STATE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.abstractsuper.USState</param> + <param name="eclassifier">USState</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/issues/abstractsuper</param> + </type> + </property> + <property name="zip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger"> + <column not-null="false" unique="false" name="`ZIP`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.CustomerImpl" entity-name="Customer" abstract="false" lazy="false" discriminator-value="Customer" table="`CUSTOMER`"> + <meta attribute="eclassName" inherit="false">Customer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CUSTOMERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.SpecificCustomerImpl" entity-name="SpecificCustomer" abstract="false" lazy="false" extends="Customer" discriminator-value="SpecificCustomer"> + <meta attribute="eclassName" inherit="false">SpecificCustomer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <property name="specificName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPECIFICNAME`"/> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.samples.issues.abstractsuper.impl.UKAddressListImpl" entity-name="UKAddressList" abstract="false" lazy="false" discriminator-value="UKAddressList" table="`UKADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">UKAddressList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/issues/abstractsuper</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="UKADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="address" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="UKADDRESSLIST_ADDRESS"> + <column name="`UKADDRESSLIST_ADDRESS_NAME`" unique="false"/> + </key> + <list-index column="`UKADDRESSLIST_ADDRESS_IDX`"/> + <one-to-many entity-name="UKAddress"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ224991Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ224991Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e911d4fbd --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ224991Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz224991.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz224991</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.bz224991.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Parent" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz224991</meta> + <key> + <column name="`MYPK`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ224991Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ224991Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..a47f6f115 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ224991Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,22 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz224991.impl.ParentImpl" entity-name="Parent" abstract="false" lazy="false" discriminator-value="Parent" table="`PARENT`"> + <meta attribute="eclassName" inherit="false">Parent</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz224991</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz224991.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" extends="Parent" discriminator-value="Child"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz224991</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2f1024c83 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,571 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.BlockImpl" entity-name="Block" abstract="false" lazy="false" table="`OPS_BLOCK`"> + <meta attribute="eclassName" inherit="false">Block</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <many-to-one name="vserver" entity-name="VServer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BLOCK_VSERVER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VSERVER_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="agent" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AGENT`"/> + </property> + <property name="service" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SERVICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DataCenterImpl" entity-name="DataCenter" abstract="false" lazy="false" table="`OPS_DATACENTER`"> + <meta attribute="eclassName" inherit="false">DataCenter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="host" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DATACENTER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Host"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DomainImpl" entity-name="Domain" abstract="false" lazy="false" table="`DOMAIN`"> + <meta attribute="eclassName" inherit="false">Domain</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="systems" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`DOMAIN_SYSTEM`"> + <key update="true"> + <column name="`DOMAIN_ID`" unique="false"/> + </key> + <many-to-many entity-name="DomainSystem" unique="false" foreign-key="DOMAIN_SYSTEMS"> + <column name="`SYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DomainSystemImpl" entity-name="DomainSystem" abstract="false" lazy="false" table="`DOMAINSYSTEM`"> + <meta attribute="eclassName" inherit="false">DomainSystem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <bag name="domains" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`DOMAIN_SYSTEM`"> + <key update="true"> + <column name="`SYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="Domain" unique="false" foreign-key="DOMAINSYSTEM_DOMAINS"> + <column name="`DOMAIN_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="opsSystem" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_DOMAINSYSTEM_OPSSYSTEM`"> + <key update="true"> + <column name="`DOMAINSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="OpsSystem" unique="false" foreign-key="DOMAINSYSTEM_OPSSYSTEM"> + <column name="`OPSSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <many-to-one name="interface" entity-name="Interface" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOMAINSYSTEM_INTERFACE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`INTERFACE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="forwardEmail" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FORWARDEMAIL`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.FailoverTypeImpl" entity-name="FailoverType" abstract="false" lazy="false" table="`OPS_FAILOVERTYPE`"> + <meta attribute="eclassName" inherit="false">FailoverType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.HostImpl" entity-name="Host" abstract="false" lazy="false" table="`OPS_HOST`"> + <meta attribute="eclassName" inherit="false">Host</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <many-to-one name="dataCenter" entity-name="DataCenter" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_DATACENTER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`DATACENTER_ID`"/> + </many-to-one> + <bag name="vserver" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="ip" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="IP"/> + </bag> + <many-to-one name="ownIp" entity-name="IP" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_OWNIP" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OWNIP_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + <property name="network" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`NETWORK`" length="64000"/> + </property> + <property name="providerId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`PROVIDERID`" length="64000"/> + </property> + <many-to-one name="gateway" entity-name="IP" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_GATEWAY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`IP_GATEWAY_ID`"/> + </many-to-one> + <bag name="block" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="HostBlock"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.HostBlockImpl" entity-name="HostBlock" abstract="false" lazy="false" table="`OPS_HOSTBLOCK`"> + <meta attribute="eclassName" inherit="false">HostBlock</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOSTBLOCK_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="agent" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AGENT`"/> + </property> + <property name="service" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SERVICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.InterfaceImpl" entity-name="Interface" abstract="false" lazy="false" table="`OPS_INTERFACE`"> + <meta attribute="eclassName" inherit="false">Interface</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="role" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_ROLE_INTERFACE`"> + <key update="true"> + <column name="`INTERFACE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Role" unique="false" foreign-key="INTERFACE_ROLE"> + <column name="`ROLE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="domainSystem" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`INTERFACE_ID`" unique="false"/> + </key> + <one-to-many entity-name="DomainSystem"/> + </bag> + <many-to-one name="failoverType" entity-name="FailoverType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="INTERFACE_FAILOVERTYPE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FAILOVERTYPE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="port" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PORT`"/> + </property> + <property name="external" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`EXTERNAL`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.IPImpl" entity-name="IP" abstract="false" lazy="false" table="`OPS_IP`"> + <meta attribute="eclassName" inherit="false">IP</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <property name="ip" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`IP`"/> + </property> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="IP_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.IpType</param> + <param name="eclassifier">IpType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</param> + </type> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="shared" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`SHARED`"/> + </property> + <bag name="ipName" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_IP_IPNAME`"> + <key update="true"> + <column name="`IP_ID`" unique="false"/> + </key> + <many-to-many entity-name="IPName" unique="false" foreign-key="IP_IPNAME"> + <column name="`IPNAME_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="vserver" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_VSERVER_IP`"> + <key update="true"> + <column name="`IP_ID`" unique="false"/> + </key> + <many-to-many entity-name="VServer" unique="false" foreign-key="IP_VSERVER"> + <column name="`VSERVER_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.MuninInfoImpl" entity-name="MuninInfo" abstract="false" lazy="false" table="`OPS_MUNININFO`"> + <meta attribute="eclassName" inherit="false">MuninInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="pluginName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`PLUGINNAME`" length="64000"/> + </property> + <property name="warningLevel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`WARNINGLEVEL`"/> + </property> + <property name="criticalLevel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CRITICALLEVEL`"/> + </property> + <property name="monitorableByNagios" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MONITORABLEBYNAGIOS`"/> + </property> + <property name="displaySummary" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`DISPLAYSUMMARY`"/> + </property> + <many-to-one name="role" entity-name="Role" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MUNININFO_ROLE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ROLE_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.IPNameImpl" entity-name="IPName" abstract="false" lazy="false" table="`OPS_IPNAME`"> + <meta attribute="eclassName" inherit="false">IPName</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="ip" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_IP_IPNAME`"> + <key update="true"> + <column name="`IPNAME_ID`" unique="false"/> + </key> + <many-to-many entity-name="IP" unique="false" foreign-key="IPNAME_IP"> + <column name="`IP_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.ParameterImpl" entity-name="Parameter" abstract="false" lazy="false" table="`OPS_PARAMETER`"> + <meta attribute="eclassName" inherit="false">Parameter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`VALUE`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.RoleImpl" entity-name="Role" abstract="false" lazy="false" table="`OPS_ROLE`"> + <meta attribute="eclassName" inherit="false">Role</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="interface" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_ROLE_INTERFACE`"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Interface" unique="false" foreign-key="ROLE_INTERFACE"> + <column name="`INTERFACE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="vserver" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="requiredInterface" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_ROLE_REQUREDINTERFACE`"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Interface" unique="false" foreign-key="ROLE_REQUIREDINTERFACE"> + <column name="`INTERFACE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <bag name="muninInfo" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <one-to-many entity-name="MuninInfo"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.OpsSystemImpl" entity-name="OpsSystem" abstract="false" lazy="false" table="`OPS_OPSSYSTEM`"> + <meta attribute="eclassName" inherit="false">OpsSystem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="ownVserver" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`OWN_OPSSYSTEM_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="servingVserver" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_VSERVER_OPSSYSTEM`"> + <key update="true"> + <column name="`OPSSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="VServer" unique="false" foreign-key="OPSSYSTEM_SERVINGVSERVER"> + <column name="`VSERVER_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="domainSystem" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_DOMAINSYSTEM_OPSSYSTEM`"> + <key update="true"> + <column name="`OPSSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="DomainSystem" unique="false" foreign-key="OPSSYSTEM_DOMAINSYSTEM"> + <column name="`DOMAINSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.VServerImpl" entity-name="VServer" abstract="false" lazy="false" table="`OPS_VSERVER`"> + <meta attribute="eclassName" inherit="false">VServer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="block" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Block"/> + </bag> + <many-to-one name="ownSystem" entity-name="OpsSystem" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_OWNSYSTEM" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OWN_OPSSYSTEM_ID`"/> + </many-to-one> + <bag name="servedSystem" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_VSERVER_OPSSYSTEM`"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <many-to-many entity-name="OpsSystem" unique="false" foreign-key="VSERVER_SERVEDSYSTEM"> + <column name="`OPSSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="ip" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_VSERVER_IP`"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <many-to-many entity-name="IP" unique="false" foreign-key="VSERVER_IP"> + <column name="`IP_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <many-to-one name="role" entity-name="Role" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_ROLE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ROLE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHClusterImpl" entity-name="DWHCluster" abstract="false" lazy="false" table="`OPS_DWHCLUSTER`"> + <meta attribute="eclassName" inherit="false">DWHCluster</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="instance" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DWHCLUSTER_INSTANCE"> + <column name="`DWHCLUSTER_ID`" unique="false"/> + </key> + <one-to-many entity-name="DWHInstance"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl" entity-name="DWHInstance" abstract="false" lazy="false" table="`OPS_DWHINSTANCE`"> + <meta attribute="eclassName" inherit="false">DWHInstance</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="etl" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="DWHINSTANCE_ETL"> + <column name="`DWHINSTANCE_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..45ecd6981 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,622 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.BlockImpl" entity-name="Block" abstract="false" lazy="false" discriminator-value="Block" table="`OPS_BLOCK`"> + <meta attribute="eclassName" inherit="false">Block</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_blockDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <many-to-one name="vserver" entity-name="VServer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BLOCK_VSERVER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VSERVER_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="agent" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AGENT`"/> + </property> + <property name="service" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SERVICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DataCenterImpl" entity-name="DataCenter" abstract="false" lazy="false" discriminator-value="DataCenter" table="`OPS_DATACENTER`"> + <meta attribute="eclassName" inherit="false">DataCenter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_datacenterDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="host" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DATACENTER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Host"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DomainImpl" entity-name="Domain" abstract="false" lazy="false" discriminator-value="Domain" table="`DOMAIN`"> + <meta attribute="eclassName" inherit="false">Domain</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DOMAINDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="systems" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`DOMAIN_SYSTEM`"> + <key update="true"> + <column name="`DOMAIN_ID`" unique="false"/> + </key> + <many-to-many entity-name="DomainSystem" unique="false" foreign-key="DOMAIN_SYSTEMS"> + <column name="`SYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DomainSystemImpl" entity-name="DomainSystem" abstract="false" lazy="false" discriminator-value="DomainSystem" table="`DOMAINSYSTEM`"> + <meta attribute="eclassName" inherit="false">DomainSystem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DOMAINSYSTEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <bag name="domains" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`DOMAIN_SYSTEM`"> + <key update="true"> + <column name="`SYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="Domain" unique="false" foreign-key="DOMAINSYSTEM_DOMAINS"> + <column name="`DOMAIN_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="opsSystem" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_DOMAINSYSTEM_OPSSYSTEM`"> + <key update="true"> + <column name="`DOMAINSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="OpsSystem" unique="false" foreign-key="DOMAINSYSTEM_OPSSYSTEM"> + <column name="`OPSSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <many-to-one name="interface" entity-name="Interface" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOMAINSYSTEM_INTERFACE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`INTERFACE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="forwardEmail" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FORWARDEMAIL`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.FailoverTypeImpl" entity-name="FailoverType" abstract="false" lazy="false" discriminator-value="FailoverType" table="`OPS_FAILOVERTYPE`"> + <meta attribute="eclassName" inherit="false">FailoverType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_failovertypeDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.HostImpl" entity-name="Host" abstract="false" lazy="false" discriminator-value="Host" table="`OPS_HOST`"> + <meta attribute="eclassName" inherit="false">Host</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_hostDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <many-to-one name="dataCenter" entity-name="DataCenter" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_DATACENTER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`DATACENTER_ID`"/> + </many-to-one> + <bag name="vserver" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="ip" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="IP"/> + </bag> + <many-to-one name="ownIp" entity-name="IP" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_OWNIP" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OWNIP_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + <property name="network" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`NETWORK`" length="64000"/> + </property> + <property name="providerId" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`PROVIDERID`" length="64000"/> + </property> + <many-to-one name="gateway" entity-name="IP" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_GATEWAY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`IP_GATEWAY_ID`"/> + </many-to-one> + <bag name="block" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="HostBlock"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.HostBlockImpl" entity-name="HostBlock" abstract="false" lazy="false" discriminator-value="HostBlock" table="`OPS_HOSTBLOCK`"> + <meta attribute="eclassName" inherit="false">HostBlock</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_hostblockDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOSTBLOCK_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="agent" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AGENT`"/> + </property> + <property name="service" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SERVICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.InterfaceImpl" entity-name="Interface" abstract="false" lazy="false" discriminator-value="Interface" table="`OPS_INTERFACE`"> + <meta attribute="eclassName" inherit="false">Interface</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_interfaceDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="role" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_ROLE_INTERFACE`"> + <key update="true"> + <column name="`INTERFACE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Role" unique="false" foreign-key="INTERFACE_ROLE"> + <column name="`ROLE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="domainSystem" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`INTERFACE_ID`" unique="false"/> + </key> + <one-to-many entity-name="DomainSystem"/> + </bag> + <many-to-one name="failoverType" entity-name="FailoverType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="INTERFACE_FAILOVERTYPE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FAILOVERTYPE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="port" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PORT`"/> + </property> + <property name="external" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`EXTERNAL`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.IPImpl" entity-name="IP" abstract="false" lazy="false" discriminator-value="IP" table="`OPS_IP`"> + <meta attribute="eclassName" inherit="false">IP</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_ipDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <property name="ip" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`IP`"/> + </property> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="IP_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.IpType</param> + <param name="eclassifier">IpType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</param> + </type> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="shared" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`SHARED`"/> + </property> + <bag name="ipName" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_IP_IPNAME`"> + <key update="true"> + <column name="`IP_ID`" unique="false"/> + </key> + <many-to-many entity-name="IPName" unique="false" foreign-key="IP_IPNAME"> + <column name="`IPNAME_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="vserver" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_VSERVER_IP`"> + <key update="true"> + <column name="`IP_ID`" unique="false"/> + </key> + <many-to-many entity-name="VServer" unique="false" foreign-key="IP_VSERVER"> + <column name="`VSERVER_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.MuninInfoImpl" entity-name="MuninInfo" abstract="false" lazy="false" discriminator-value="MuninInfo" table="`OPS_MUNININFO`"> + <meta attribute="eclassName" inherit="false">MuninInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_munininfoDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="pluginName" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`PLUGINNAME`" length="64000"/> + </property> + <property name="warningLevel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`WARNINGLEVEL`"/> + </property> + <property name="criticalLevel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CRITICALLEVEL`"/> + </property> + <property name="monitorableByNagios" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MONITORABLEBYNAGIOS`"/> + </property> + <property name="displaySummary" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`DISPLAYSUMMARY`"/> + </property> + <many-to-one name="role" entity-name="Role" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MUNININFO_ROLE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ROLE_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.IPNameImpl" entity-name="IPName" abstract="false" lazy="false" discriminator-value="IPName" table="`OPS_IPNAME`"> + <meta attribute="eclassName" inherit="false">IPName</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_ipnameDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="ip" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_IP_IPNAME`"> + <key update="true"> + <column name="`IPNAME_ID`" unique="false"/> + </key> + <many-to-many entity-name="IP" unique="false" foreign-key="IPNAME_IP"> + <column name="`IP_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.ParameterImpl" entity-name="Parameter" abstract="false" lazy="false" discriminator-value="Parameter" table="`OPS_PARAMETER`"> + <meta attribute="eclassName" inherit="false">Parameter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_parameterDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`VALUE`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.RoleImpl" entity-name="Role" abstract="false" lazy="false" discriminator-value="Role" table="`OPS_ROLE`"> + <meta attribute="eclassName" inherit="false">Role</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_roleDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="interface" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_ROLE_INTERFACE`"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Interface" unique="false" foreign-key="ROLE_INTERFACE"> + <column name="`INTERFACE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="vserver" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="requiredInterface" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_ROLE_REQUREDINTERFACE`"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Interface" unique="false" foreign-key="ROLE_REQUIREDINTERFACE"> + <column name="`INTERFACE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <bag name="muninInfo" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <one-to-many entity-name="MuninInfo"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.OpsSystemImpl" entity-name="OpsSystem" abstract="false" lazy="false" discriminator-value="OpsSystem" table="`OPS_OPSSYSTEM`"> + <meta attribute="eclassName" inherit="false">OpsSystem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_opssystemDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="ownVserver" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`OWN_OPSSYSTEM_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="servingVserver" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_VSERVER_OPSSYSTEM`"> + <key update="true"> + <column name="`OPSSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="VServer" unique="false" foreign-key="OPSSYSTEM_SERVINGVSERVER"> + <column name="`VSERVER_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="domainSystem" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_DOMAINSYSTEM_OPSSYSTEM`"> + <key update="true"> + <column name="`OPSSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="DomainSystem" unique="false" foreign-key="OPSSYSTEM_DOMAINSYSTEM"> + <column name="`DOMAINSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.VServerImpl" entity-name="VServer" abstract="false" lazy="false" discriminator-value="VServer" table="`OPS_VSERVER`"> + <meta attribute="eclassName" inherit="false">VServer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_vserverDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="block" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Block"/> + </bag> + <many-to-one name="ownSystem" entity-name="OpsSystem" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_OWNSYSTEM" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OWN_OPSSYSTEM_ID`"/> + </many-to-one> + <bag name="servedSystem" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_VSERVER_OPSSYSTEM`"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <many-to-many entity-name="OpsSystem" unique="false" foreign-key="VSERVER_SERVEDSYSTEM"> + <column name="`OPSSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="ip" fetch="subselect" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_VSERVER_IP`"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <many-to-many entity-name="IP" unique="false" foreign-key="VSERVER_IP"> + <column name="`IP_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <many-to-one name="role" entity-name="Role" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_ROLE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ROLE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHClusterImpl" entity-name="DWHCluster" abstract="false" lazy="false" discriminator-value="DWHCluster" table="`OPS_DWHCLUSTER`"> + <meta attribute="eclassName" inherit="false">DWHCluster</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_dwhclusterDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`NAME`"/> + </property> + <bag name="instance" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DWHCLUSTER_INSTANCE"> + <column name="`DWHCLUSTER_ID`" unique="false"/> + </key> + <one-to-many entity-name="DWHInstance"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl" entity-name="DWHInstance" abstract="false" lazy="false" discriminator-value="DWHInstance" table="`OPS_DWHINSTANCE`"> + <meta attribute="eclassName" inherit="false">DWHInstance</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_dwhinstanceDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="etl" fetch="subselect" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="DWHINSTANCE_ETL"> + <column name="`DWHINSTANCE_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_x_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_x_o_hibernate.hbm.xml new file mode 100644 index 000000000..9519dbaa7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ225296_2Action_hsqldb_x_o_hibernate.hbm.xml @@ -0,0 +1,634 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.BlockImpl" entity-name="Block" abstract="false" lazy="true" discriminator-value="Block" table="`OPS_BLOCK`" proxy="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.Block"> + <meta attribute="eclassName" inherit="false">Block</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_blockDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <many-to-one name="vserver" entity-name="VServer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BLOCK_VSERVER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`VSERVER_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="agent" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AGENT`"/> + </property> + <property name="service" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SERVICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DataCenterImpl" entity-name="DataCenter" abstract="false" lazy="false" discriminator-value="DataCenter" table="`OPS_DATACENTER`"> + <meta attribute="eclassName" inherit="false">DataCenter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_datacenterDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="host" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`DATACENTER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Host"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DomainImpl" entity-name="Domain" abstract="false" lazy="false" discriminator-value="Domain" table="`DOMAIN`"> + <meta attribute="eclassName" inherit="false">Domain</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="domainDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="systems" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`DOMAIN_SYSTEM`"> + <key update="true"> + <column name="`DOMAIN_ID`" unique="false"/> + </key> + <many-to-many entity-name="DomainSystem" unique="false" foreign-key="DOMAIN_SYSTEMS"> + <column name="`DOMAINSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DomainSystemImpl" entity-name="DomainSystem" abstract="false" lazy="false" discriminator-value="DomainSystem" table="`DOMAINSYSTEM`"> + <meta attribute="eclassName" inherit="false">DomainSystem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="domainsystemDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <bag name="domains" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`DOMAIN_SYSTEM`"> + <key update="true"> + <column name="`SYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="Domain" unique="false" foreign-key="DOMAINSYSTEM_DOMAINS"> + <column name="`DOMAIN_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="opsSystem" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_DOMAINSYSTEM_OPSSYSTEM`"> + <key update="true"> + <column name="`DOMAINSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="OpsSystem" unique="false" foreign-key="DOMAINSYSTEM_OPSSYSTEM"> + <column name="`SYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <many-to-one name="interface" entity-name="Interface" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOMAINSYSTEM_INTERFACE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`INTERFACE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="forwardEmail" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FORWARDEMAIL`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.FailoverTypeImpl" entity-name="FailoverType" abstract="false" lazy="false" discriminator-value="FailoverType" table="`OPS_FAILOVERTYPE`"> + <meta attribute="eclassName" inherit="false">FailoverType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_failovertypeDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.HostImpl" entity-name="Host" abstract="false" lazy="false" discriminator-value="Host" table="`OPS_HOST`"> + <meta attribute="eclassName" inherit="false">Host</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_hostDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="dataCenter" entity-name="DataCenter" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_DATACENTER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_DATACENTER_ID`"/> + </many-to-one> + <bag name="vserver" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="ip" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="IP"/> + </bag> + <many-to-one name="ownIp" entity-name="IP" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_OWNIP" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OWNIP_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`DESCRIPTION`" length="64000"/> + </property> + <property name="network" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`NETWORK`" length="64000"/> + </property> + <property name="providerId" lazy="false" insert="true" update="true" not-null="false" unique="true" type="text"> + <column not-null="false" unique="true" name="`PROVIDERID`" length="64000"/> + </property> + <many-to-one name="gateway" entity-name="IP" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOST_GATEWAY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`IP_GATEWAY_ID`"/> + </many-to-one> + <bag name="block" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`HOST_ID`" unique="false"/> + </key> + <one-to-many entity-name="HostBlock"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.HostBlockImpl" entity-name="HostBlock" abstract="false" lazy="false" discriminator-value="HostBlock" table="`OPS_HOSTBLOCK`"> + <meta attribute="eclassName" inherit="false">HostBlock</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_hostblockDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="HOSTBLOCK_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="agent" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`AGENT`"/> + </property> + <property name="service" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SERVICE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.InterfaceImpl" entity-name="Interface" abstract="false" lazy="false" discriminator-value="Interface" table="`OPS_INTERFACE`"> + <meta attribute="eclassName" inherit="false">Interface</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_interfaceDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="role" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_ROLE_INTERFACE`"> + <key update="true"> + <column name="`INTERFACE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Role" unique="false" foreign-key="INTERFACE_ROLE"> + <column name="`ROLE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="domainSystem" fetch="select" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`INTERFACE_ID`" unique="false"/> + </key> + <one-to-many entity-name="DomainSystem"/> + </bag> + <many-to-one name="failoverType" entity-name="FailoverType" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="INTERFACE_FAILOVERTYPE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`FAILOVERTYPE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="port" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PORT`"/> + </property> + <property name="external" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`EXTERNAL`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.IPImpl" entity-name="IP" abstract="false" lazy="false" discriminator-value="IP" table="`OPS_IP`"> + <meta attribute="eclassName" inherit="false">IP</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_ipDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="ip" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`IP`"/> + </property> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="IP_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`TYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.IpType</param> + <param name="eclassifier">IpType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</param> + </type> + </property> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="shared" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`SHARED`"/> + </property> + <bag name="ipName" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_IP_IPNAME`"> + <key update="true"> + <column name="`IP_ID`" unique="false"/> + </key> + <many-to-many entity-name="IPName" unique="false" foreign-key="IP_IPNAME"> + <column name="`IPNAME_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="vserver" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_VSERVER_IP`"> + <key update="true"> + <column name="`IP_ID`" unique="false"/> + </key> + <many-to-many entity-name="VServer" unique="false" foreign-key="IP_VSERVER"> + <column name="`VSERVER_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.MuninInfoImpl" entity-name="MuninInfo" abstract="false" lazy="false" discriminator-value="MuninInfo" table="`OPS_MUNININFO`"> + <meta attribute="eclassName" inherit="false">MuninInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_munininfoDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="pluginName" lazy="false" insert="true" update="true" not-null="false" unique="true" type="text"> + <column not-null="false" unique="true" name="`PLUGINNAME`" length="64000"/> + </property> + <property name="warningLevel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`WARNINGLEVEL`"/> + </property> + <property name="criticalLevel" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CRITICALLEVEL`"/> + </property> + <property name="monitorableByNagios" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`MONITORABLEBYNAGIOS`"/> + </property> + <property name="displaySummary" lazy="false" insert="true" update="true" not-null="false" unique="false" type="boolean"> + <column not-null="false" unique="false" name="`DISPLAYSUMMARY`"/> + </property> + <many-to-one name="role" entity-name="Role" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MUNININFO_ROLE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ROLE_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.IPNameImpl" entity-name="IPName" abstract="false" lazy="false" discriminator-value="IPName" table="`OPS_IPNAME`"> + <meta attribute="eclassName" inherit="false">IPName</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_ipnameDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="ip" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_IP_IPNAME`"> + <key update="true"> + <column name="`IPNAME_ID`" unique="false"/> + </key> + <many-to-many entity-name="IP" unique="false" foreign-key="IPNAME_IP"> + <column name="`IP_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.ParameterImpl" entity-name="Parameter" abstract="false" lazy="false" discriminator-value="Parameter" table="`OPS_PARAMETER`"> + <meta attribute="eclassName" inherit="false">Parameter</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_parameterDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.RoleImpl" entity-name="Role" abstract="false" lazy="false" discriminator-value="Role" table="`OPS_ROLE`"> + <meta attribute="eclassName" inherit="false">Role</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_roleDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="interface" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_ROLE_INTERFACE`"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Interface" unique="false" foreign-key="ROLE_INTERFACE"> + <column name="`INTERFACE_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="vserver" fetch="select" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="requiredInterface" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_ROLE_REQUREDINTERFACE`"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <many-to-many entity-name="Interface" unique="false" foreign-key="ROLE_REQUIREDINTERFACE"/> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + <bag name="muninInfo" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`ROLE_ID`" unique="false"/> + </key> + <one-to-many entity-name="MuninInfo"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.OpsSystemImpl" entity-name="OpsSystem" abstract="false" lazy="false" discriminator-value="OpsSystem" table="`OPS_OPSSYSTEM`"> + <meta attribute="eclassName" inherit="false">OpsSystem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_opssystemDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="ownVserver" fetch="select" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`OWN_OPSSYSTEM_ID`" unique="false"/> + </key> + <one-to-many entity-name="VServer"/> + </bag> + <bag name="servingVserver" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_VSERVER_OPSSYSTEM`"> + <key update="true"> + <column name="`OPSSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="VServer" unique="false" foreign-key="OPSSYSTEM_SERVINGVSERVER"> + <column name="`VSERVER_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="domainSystem" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`OPS_DOMAINSYSTEM_OPSSYSTEM`"> + <key update="true"> + <column name="`OPSSYSTEM_ID`" unique="false"/> + </key> + <many-to-many entity-name="DomainSystem" unique="false" foreign-key="OPSSYSTEM_DOMAINSYSTEM"> + <column name="`DOMAINSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.VServerImpl" entity-name="VServer" abstract="false" lazy="false" discriminator-value="VServer" table="`OPS_VSERVER`"> + <meta attribute="eclassName" inherit="false">VServer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ops_vserverDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="revision" type="int"> + <column not-null="false" unique="false" name="`E_VERSION`"/> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="block" fetch="select" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Block"/> + </bag> + <many-to-one name="ownSystem" entity-name="OpsSystem" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_OWNSYSTEM" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`OWN_OPSSYSTEM_ID`"/> + </many-to-one> + <bag name="servedSystem" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_VSERVER_OPSSYSTEM`"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <many-to-many entity-name="OpsSystem" unique="false" foreign-key="VSERVER_SERVEDSYSTEM"> + <column name="`OPSSYSTEM_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="ip" fetch="select" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`OPS_VSERVER_IP`"> + <key update="true"> + <column name="`VSERVER_ID`" unique="false"/> + </key> + <many-to-many entity-name="IP" unique="false" foreign-key="VSERVER_IP"> + <column name="`IP_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <many-to-one name="host" entity-name="Host" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_HOST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HOST_ID`"/> + </many-to-one> + <many-to-one name="role" entity-name="Role" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="VSERVER_ROLE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`ROLE_ID`"/> + </many-to-one> + <property name="modified" lazy="false" insert="false" update="false" not-null="false" unique="false" generated="always" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`" sql-type="timestamp"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHClusterImpl" entity-name="DWHCluster" abstract="false" lazy="false" discriminator-value="DWHCluster" table="`DWHCLUSTER`"> + <meta attribute="eclassName" inherit="false">DWHCluster</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DWHCLUSTERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="instance" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="DWHCLUSTER_INSTANCE"> + <column name="`DWHCLUSTER_INSTANCE_E_ID`" unique="false"/> + </key> + <list-index column="`DWHCLUSTER_INSTANCE_IDX`"/> + <one-to-many entity-name="DWHInstance"/> + </list> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="modified" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`"/> + </property> + <property name="revision" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`REVISION`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl" entity-name="DWHInstance" abstract="false" lazy="false" discriminator-value="DWHInstance" table="`DWHINSTANCE`"> + <meta attribute="eclassName" inherit="false">DWHInstance</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296_2</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DWHINSTANCEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ID`"/> + </property> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="etl" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="DWHINSTANCE_ETL"> + <column name="`DWHINSTANCE_ETL_E_ID`" unique="false"/> + </key> + <list-index column="`DWHINSTANCE_ETL_IDX`"/> + <one-to-many entity-name="VServer"/> + </list> + <property name="modified" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`MODIFIED`"/> + </property> + <property name="revision" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`REVISION`"/> + </property> + <property name="description" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`DESCRIPTION`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237361Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237361Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..672c85174 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237361Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237361.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237361</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="manies" inverse="true" table="`MANIESOFONE`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ONE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Many" unique="true"> + <column name="`MANY_E_ID`" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237361.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237361</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + <join table="`MANIESOFONE`" inverse="false" optional="true"> + <key update="true"> + <column name="`MANY_E_ID`" unique="false"/> + </key> + <many-to-one name="one" entity-name="One" lazy="false" insert="true" update="true" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANY_ONE"> + <column not-null="false" unique="false" name="`ONE_E_ID`"/> + </many-to-one> + </join> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237361Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237361Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c8a7aa742 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237361Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,52 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237361.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237361</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="manies" inverse="true" table="`MANIESOFONE`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`ONE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Many" unique="true"> + <column name="`MANY_E_ID`" unique="false"/> + </many-to-many> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237361.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237361</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + <join table="`MANIESOFONE`" inverse="false" optional="true"> + <key update="true"> + <column name="`MANY_E_ID`" unique="false"/> + </key> + <many-to-one name="one" entity-name="One" lazy="false" insert="true" update="true" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANY_ONE"> + <column not-null="false" unique="false" name="`ONE_E_ID`"/> + </many-to-one> + </join> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237498Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237498Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..19e24ac53 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237498Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,36 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237498.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237498</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="manies" order-by="`myname` asc" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ONE_MANIES"> + <column name="`ONE_MANIES_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Many"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237498.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237498</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237498Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237498Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..07c4257dc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237498Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,42 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237498.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237498</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <bag name="manies" order-by="`myname` asc" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ONE_MANIES"> + <column name="`ONE_MANIES_E_ID`" unique="false"/> + </key> + <one-to-many entity-name="Many"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237498.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237498</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237790Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237790Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..b1f84bb57 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237790Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,41 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <idbag name="manies" table="`ONE_MANY`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`ONE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Many" unique="false" foreign-key="ONE_MANIES"> + <column name="`MANY_E_ID`" unique="false"/> + </many-to-many> + </idbag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237790Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237790Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6cd6e1077 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237790Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,47 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <idbag name="manies" table="`ONE_MANY`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <collection-id column="ID" type="long"> + <generator class="increment"/> + </collection-id> + <key update="true"> + <column name="`ONE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Many" unique="false" foreign-key="ONE_MANIES"> + <column name="`MANY_E_ID`" unique="false"/> + </many-to-many> + </idbag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237790.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz225296</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237994Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237994Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..bb2e9c2ef --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237994Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,40 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237994.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237994</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="manies" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`REF_TO_ONE`" unique="false"/> + </key> + <list-index column="`ONE_MANIES_IDX`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237994.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237994</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + <many-to-one name="one" entity-name="One" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANY_ONE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`REF_TO_ONE`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237994Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237994Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..81d3663fa --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ237994Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz237994.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237994</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="manies" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`REF_TO_ONE`" unique="false"/> + </key> + <list-index column="`ONE_MANIES_IDX`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz237994.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`MANY`"> + <meta attribute="eclassName" inherit="false">Many</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz237994</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MANYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MYNAME`"/> + </property> + <many-to-one name="one" entity-name="One" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MANY_ONE" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`REF_TO_ONE`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247785Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247785Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ddd3487c6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247785Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz247785.impl.OwnerImpl" entity-name="Owner" abstract="false" lazy="false" table="`OWNER`"> + <meta attribute="eclassName" inherit="false">Owner</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247785</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`OWNER_ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="ownedCats" inverse="true" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`CAT_OWNER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Cat"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz247785.bz247785Sub.impl.AnimalImpl" entity-name="Animal" abstract="false" lazy="false" discriminator-value="Animal" table="`ANIMAL`"> + <meta attribute="eclassName" inherit="false">Animal</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247785/sub</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`ANIMAL_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ANIMALDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz247785.bz247785Sub.impl.CatImpl" entity-name="Cat" abstract="false" lazy="false" extends="Animal" discriminator-value="Cat"> + <meta attribute="eclassName" inherit="false">Cat</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247785/sub</meta> + <many-to-one name="owner" entity-name="Owner" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CAT_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CAT_OWNER_ID`"/> + </many-to-one> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247785Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247785Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..dc0f5b2d4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247785Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,49 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz247785.impl.OwnerImpl" entity-name="Owner" abstract="false" lazy="false" discriminator-value="Owner" table="`OWNER`"> + <meta attribute="eclassName" inherit="false">Owner</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247785</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`OWNER_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="OWNERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="ownedCats" inverse="true" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`CAT_OWNER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Cat"/> + </bag> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz247785.bz247785Sub.impl.AnimalImpl" entity-name="Animal" abstract="false" lazy="false" discriminator-value="Animal" table="`ANIMAL`"> + <meta attribute="eclassName" inherit="false">Animal</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247785/sub</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`ANIMAL_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ANIMALDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz247785.bz247785Sub.impl.CatImpl" entity-name="Cat" abstract="false" lazy="false" extends="Animal" discriminator-value="Cat"> + <meta attribute="eclassName" inherit="false">Cat</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247785/sub</meta> + <many-to-one name="owner" entity-name="Owner" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CAT_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CAT_OWNER_ID`"/> + </many-to-one> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247939Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247939Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..3610c8df5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247939Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,51 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz247939.impl.AnimalImpl" entity-name="Animal" abstract="false" lazy="false" discriminator-value="Animal" table="`ANIMAL`"> + <meta attribute="eclassName" inherit="false">Animal</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247939</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`ANIMAL_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`ANIMAL_TYPE`" index="ANIMALANIMAL_TYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz247939.impl.OwnerImpl" entity-name="Owner" abstract="false" lazy="false" table="`OWNER`"> + <meta attribute="eclassName" inherit="false">Owner</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247939</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`OWNER_ID`"/> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="ownedCats" inverse="true" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`CAT_OWNER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Cat"/> + </bag> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz247939.impl.CatImpl" entity-name="Cat" abstract="false" lazy="false" extends="Animal" discriminator-value="Cat"> + <meta attribute="eclassName" inherit="false">Cat</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247939</meta> + <join table="`CAT`"> + <key> + <column name="`ANIMAL_ID`"/> + </key> + <many-to-one name="owner" entity-name="Owner" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CAT_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CAT_OWNER_ID`"/> + </many-to-one> + </join> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247939Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247939Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f7fc511f9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ247939Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,54 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz247939.impl.AnimalImpl" entity-name="Animal" abstract="false" lazy="false" discriminator-value="Animal" table="`ANIMAL`"> + <meta attribute="eclassName" inherit="false">Animal</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247939</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`ANIMAL_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`ANIMAL_TYPE`" index="ANIMALANIMAL_TYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz247939.impl.OwnerImpl" entity-name="Owner" abstract="false" lazy="false" discriminator-value="Owner" table="`OWNER`"> + <meta attribute="eclassName" inherit="false">Owner</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247939</meta> + <id name="id" type="java.lang.Long"> + <column not-null="true" unique="false" name="`OWNER_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="OWNERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <bag name="ownedCats" inverse="true" lazy="true" cascade="merge,persist,save-update,lock"> + <key update="true"> + <column name="`CAT_OWNER_ID`" unique="false"/> + </key> + <one-to-many entity-name="Cat"/> + </bag> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz247939.impl.CatImpl" entity-name="Cat" abstract="false" lazy="false" extends="Animal" discriminator-value="Cat"> + <meta attribute="eclassName" inherit="false">Cat</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz247939</meta> + <join table="`CAT`"> + <key> + <column name="`ANIMAL_ID`"/> + </key> + <many-to-one name="owner" entity-name="Owner" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CAT_OWNER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CAT_OWNER_ID`"/> + </many-to-one> + </join> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249246Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249246Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..f2be54511 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249246Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,29 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz249246.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz249246</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.bz249246.impl.StudentImpl" entity-name="Student" abstract="false" lazy="false" extends="Person" table="`STUDENT`"> + <meta attribute="eclassName" inherit="false">Student</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz249246</meta> + <key> + <column name="`PERSON_E_ID`"/> + </key> + <property name="id" lazy="false" insert="true" update="true" not-null="true" unique="true" type="java.lang.String"> + <column not-null="true" unique="true" name="`ID`"/> + </property> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249246Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249246Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f18637fa5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249246Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,29 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz249246.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz249246</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.bz249246.impl.StudentImpl" entity-name="Student" abstract="false" lazy="false" extends="Person" discriminator-value="Student"> + <meta attribute="eclassName" inherit="false">Student</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz249246</meta> + <property name="id" lazy="false" insert="true" update="true" not-null="false" unique="true" type="java.lang.String"> + <column not-null="false" unique="true" name="`ID`"/> + </property> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249440Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249440Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..aec4f92a0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249440Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,85 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`AUTHOR`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`AUTHOR`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249440Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249440Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..c4064304e --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ249440Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id name="title" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`AUTHOR`"/> + </many-to-one> + <property name="test" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TEST`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS`" unique="false"/> + </key> + <list-index column="`TEST_INDEX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`AUTHOR`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ253799Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ253799Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..ff17ebfd4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ253799Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,33 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz253799.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz253799</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="ref" entity-name="Two" cascade="merge,persist,save-update,lock,refresh" not-null="true" lazy="false" foreign-key="ONE_REF" insert="true" update="true" unique="true"> + <column not-null="true" unique="false" name="`REF1`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz253799.impl.TwoImpl" entity-name="Two" abstract="false" lazy="false" table="`TWO`"> + <meta attribute="eclassName" inherit="false">Two</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz253799</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="ref" entity-name="One" cascade="merge,persist,save-update,lock,refresh" not-null="true" lazy="false" foreign-key="TWO_REF" insert="true" update="true" unique="true"> + <column not-null="true" unique="false" name="`REF1`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ253799Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ253799Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..0e42350a9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ253799Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,39 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz253799.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`ONE`"> + <meta attribute="eclassName" inherit="false">One</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz253799</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="ref" entity-name="Two" cascade="merge,persist,save-update,lock,refresh" not-null="true" lazy="false" foreign-key="ONE_REF" insert="true" update="true" unique="true"> + <column not-null="true" unique="false" name="`REF1`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz253799.impl.TwoImpl" entity-name="Two" abstract="false" lazy="false" discriminator-value="Two" table="`TWO`"> + <meta attribute="eclassName" inherit="false">Two</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz253799</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TWODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="ref" entity-name="One" cascade="merge,persist,save-update,lock,refresh" not-null="true" lazy="false" foreign-key="TWO_REF" insert="true" update="true" unique="true"> + <column not-null="true" unique="false" name="`REF1`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277546Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277546Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..6d9ec69e0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277546Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz277546.impl.AnotherVersionImpl" entity-name="AnotherVersion" abstract="false" lazy="false" table="`ANOTHERVERSION`"> + <meta attribute="eclassName" inherit="false">AnotherVersion</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz277546</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="timestamp"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz277546.impl.DateVersionImpl" entity-name="DateVersion" abstract="false" lazy="false" table="`DATEVERSION`"> + <meta attribute="eclassName" inherit="false">DateVersion</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz277546</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="java.util.Date"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz277546.impl.SimpleVersionImpl" entity-name="SimpleVersion" abstract="false" lazy="false" table="`SIMPLEVERSION`"> + <meta attribute="eclassName" inherit="false">SimpleVersion</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz277546</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="timestamp"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277546Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277546Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..9673cf361 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277546Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,47 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz277546.impl.AnotherVersionImpl" entity-name="AnotherVersion" abstract="false" lazy="false" discriminator-value="AnotherVersion" table="`ANOTHERVERSION`"> + <meta attribute="eclassName" inherit="false">AnotherVersion</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz277546</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ANOTHERVERSIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="timestamp"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz277546.impl.DateVersionImpl" entity-name="DateVersion" abstract="false" lazy="false" discriminator-value="DateVersion" table="`DATEVERSION`"> + <meta attribute="eclassName" inherit="false">DateVersion</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz277546</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DATEVERSIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="java.util.Date"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz277546.impl.SimpleVersionImpl" entity-name="SimpleVersion" abstract="false" lazy="false" discriminator-value="SimpleVersion" table="`SIMPLEVERSION`"> + <meta attribute="eclassName" inherit="false">SimpleVersion</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz277546</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SIMPLEVERSIONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="timestamp"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277570Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277570Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e910c3085 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277570Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,53 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.adept.impl.BazImpl" entity-name="Baz" abstract="true" lazy="false" table="`BAZ`"> + <meta attribute="eclassName" inherit="false">Baz</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.adept.impl.FooImpl" entity-name="Foo" abstract="false" lazy="false" table="`FOO`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <list name="bars" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FOO_BARS"> + <column name="`FOO_BARS_ID`" unique="false"/> + </key> + <list-index column="`FOO_BARS_IDX`"/> + <one-to-many entity-name="Bar"/> + </list> + <list name="biffs" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FOO_BIFFS"> + <column name="`FOO_BIFFS_ID`" unique="false"/> + </key> + <list-index column="`FOO_BIFFS_IDX`"/> + <one-to-many entity-name="Biff"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.adept.impl.BarImpl" entity-name="Bar" abstract="false" lazy="false" extends="Baz" table="`BAR`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <key> + <column name="`BAZ_ID`"/> + </key> + <many-to-one name="baz" entity-name="Baz" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BAR_BAZ" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BAZ_BAZ_ID`"/> + </many-to-one> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.adept.impl.BiffImpl" entity-name="Biff" abstract="false" lazy="false" extends="Baz" table="`BIFF`"> + <meta attribute="eclassName" inherit="false">Biff</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <key> + <column name="`BAZ_ID`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277570Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277570Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b87f329ae --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ277570Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,53 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.adept.impl.BazImpl" entity-name="Baz" abstract="true" lazy="false" discriminator-value="Baz" table="`BAZ`"> + <meta attribute="eclassName" inherit="false">Baz</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BAZDTYPE" length="255" not-null="true"/> + </discriminator> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.adept.impl.FooImpl" entity-name="Foo" abstract="false" lazy="false" discriminator-value="Foo" table="`FOO`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FOODTYPE" length="255" not-null="true"/> + </discriminator> + <list name="bars" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FOO_BARS"> + <column name="`FOO_BARS_ID`" unique="false"/> + </key> + <list-index column="`FOO_BARS_IDX`"/> + <one-to-many entity-name="Bar"/> + </list> + <list name="biffs" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="FOO_BIFFS"> + <column name="`FOO_BIFFS_ID`" unique="false"/> + </key> + <list-index column="`FOO_BIFFS_IDX`"/> + <one-to-many entity-name="Biff"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.adept.impl.BarImpl" entity-name="Bar" abstract="false" lazy="false" extends="Baz" discriminator-value="Bar"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + <many-to-one name="baz" entity-name="Baz" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BAR_BAZ" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`BAZ_BAZ_ID`"/> + </many-to-one> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.adept.impl.BiffImpl" entity-name="Biff" abstract="false" lazy="false" extends="Baz" discriminator-value="Biff"> + <meta attribute="eclassName" inherit="false">Biff</meta> + <meta attribute="epackage" inherit="false">org.eclipse.emf.teneo.samples.issues.bz277570</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ302933Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ302933Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..fa98a1694 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ302933Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,16 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz302933.bz302933_1.impl.TestTypeImpl" entity-name="TestType" abstract="false" lazy="false" table="`TESTTYPE`"> + <meta attribute="eclassName" inherit="false">TestType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz302933/subpackage1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ302933Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ302933Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..6d10e8f69 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BZ302933Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz302933.bz302933_1.impl.TestTypeImpl" entity-name="TestType" abstract="false" lazy="false" discriminator-value="TestType" table="`TESTTYPE`"> + <meta attribute="eclassName" inherit="false">TestType</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz302933/subpackage1</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTTYPEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BagDuplicateAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BagDuplicateAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..1949ba3dd --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BagDuplicateAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,29 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bagduplicate.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bagduplicate</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="father" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_FATHER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PERSON_FATHER_NAME`"/> + </many-to-one> + <many-to-one name="mother" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_MOTHER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PERSON_MOTHER_NAME`"/> + </many-to-one> + <bag name="children" table="`PERSON_PERSON`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`PERSON_CHILDREN_NAME`" unique="false"/> + </key> + <many-to-many entity-name="Person" unique="false" foreign-key="PERSON_CHILDREN"> + <column name="`PERSON_NAME`" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BagDuplicateAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BagDuplicateAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..8f91a229b --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/BagDuplicateAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,32 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bagduplicate.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bagduplicate</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="father" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_FATHER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PERSON_FATHER_NAME`"/> + </many-to-one> + <many-to-one name="mother" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_MOTHER" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PERSON_MOTHER_NAME`"/> + </many-to-one> + <bag name="children" table="`PERSON_PERSON`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`PERSON_CHILDREN_NAME`" unique="false"/> + </key> + <many-to-many entity-name="Person" unique="false" foreign-key="PERSON_CHILDREN"> + <column name="`PERSON_NAME`" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/EnumTestAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/EnumTestAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..2b8a8639f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/EnumTestAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,30 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="enumtest.ItemTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/enumtest</param> + <param name="edatatype">ItemTypeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.enumtest.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/enumtest</meta> + <id name="itemType"> + <column not-null="true" unique="false" name="`ITEMTYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.enumtest.ItemType</param> + </type> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="nullableItemType" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`NULLABLEITEMTYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.enumtest.ItemType</param> + <param name="eclassifier">ItemType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/enumtest</param> + </type> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/EnumTestAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/EnumTestAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..282d2b8ef --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/EnumTestAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,33 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="enumtest.ItemTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/enumtest</param> + <param name="edatatype">ItemTypeObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.enumtest.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/enumtest</meta> + <id name="itemType"> + <column not-null="true" unique="false" name="`ITEMTYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.enumtest.ItemType</param> + </type> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="nullableItemType" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`NULLABLEITEMTYPE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.enumtest.ItemType</param> + <param name="eclassifier">ItemType</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/enumtest</param> + </type> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/GeneralTestAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/GeneralTestAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..fd42d36d3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/GeneralTestAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,97 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="contacts" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CONTACT_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESS_CONTACTS_IDX`"/> + <one-to-many entity-name="Contact"/> + </list> + <many-to-one name="country" entity-name="Country" lazy="false" foreign-key="ADDRESS_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`COUNTRY_COUNTRY_E_ID`"/> + </many-to-one> + <many-to-one name="city" entity-name="City" lazy="false" cascade="all" foreign-key="ADDRESS_CITY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CITY_CITY_E_ID`"/> + </many-to-one> + <property name="volatileString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VOLATILESTRING`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.ContactImpl" entity-name="Contact" abstract="false" lazy="false" table="`CONTACT`"> + <meta attribute="eclassName" inherit="false">Contact</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" foreign-key="CONTACT_ADDRESS" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`CONTACT_ADDRESS_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.CountryImpl" entity-name="Country" abstract="false" lazy="false" table="`COUNTRY`"> + <meta attribute="eclassName" inherit="false">Country</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.CityImpl" entity-name="City" abstract="false" lazy="false" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.TCImpl" entity-name="TC" abstract="false" lazy="false" table="`TC`"> + <meta attribute="eclassName" inherit="false">TC</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" foreign-key="TC_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TC_ADDRESS_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/GeneralTestAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/GeneralTestAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..4b18501b3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/GeneralTestAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,112 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <list name="contacts" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`CONTACT_ADDRESS_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESS_CONTACTS_IDX`"/> + <one-to-many entity-name="Contact"/> + </list> + <many-to-one name="country" entity-name="Country" lazy="false" foreign-key="ADDRESS_COUNTRY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`COUNTRY_COUNTRY_E_ID`"/> + </many-to-one> + <many-to-one name="city" entity-name="City" lazy="false" cascade="all" foreign-key="ADDRESS_CITY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`CITY_CITY_E_ID`"/> + </many-to-one> + <property name="volatileString" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VOLATILESTRING`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.ContactImpl" entity-name="Contact" abstract="false" lazy="false" discriminator-value="Contact" table="`CONTACT`"> + <meta attribute="eclassName" inherit="false">Contact</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CONTACTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" foreign-key="CONTACT_ADDRESS" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`CONTACT_ADDRESS_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.CountryImpl" entity-name="Country" abstract="false" lazy="false" discriminator-value="Country" table="`COUNTRY`"> + <meta attribute="eclassName" inherit="false">Country</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="COUNTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.CityImpl" entity-name="City" abstract="false" lazy="false" discriminator-value="City" table="`CITY`"> + <meta attribute="eclassName" inherit="false">City</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.generaltest.impl.TCImpl" entity-name="TC" abstract="false" lazy="false" discriminator-value="TC" table="`TC`"> + <meta attribute="eclassName" inherit="false">TC</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/generaltest</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TCDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="address" entity-name="Address" lazy="false" foreign-key="TC_ADDRESS" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`TC_ADDRESS_E_ID`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InheritanceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InheritanceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..250f64d6c --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InheritanceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,60 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.ThingImpl" entity-name="Thing" abstract="false" lazy="false" table="`THING`"> + <meta attribute="eclassName" inherit="false">Thing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="things" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="THING_THINGS"> + <column name="`THING_THINGS_NAME`" unique="false"/> + </key> + <list-index column="`THING_THINGS_IDX`"/> + <one-to-many entity-name="SubThing"/> + </list> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.AnnotationImpl" entity-name="Annotation" abstract="false" lazy="false" extends="Thing" table="`ANNOTATION`"> + <meta attribute="eclassName" inherit="false">Annotation</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <key> + <column name="`THING_NAME`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.InterestImpl" entity-name="Interest" abstract="false" lazy="false" extends="Thing" table="`INTEREST`"> + <meta attribute="eclassName" inherit="false">Interest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <key> + <column name="`THING_NAME`"/> + </key> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.SubOneImpl" entity-name="SubOne" abstract="false" lazy="false" extends="Annotation" table="`SUBONE`"> + <meta attribute="eclassName" inherit="false">SubOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <key> + <column name="`ANNOTATION_NAME`"/> + </key> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.SubThingImpl" entity-name="SubThing" abstract="false" lazy="false" table="`SUBTHING`"> + <meta attribute="eclassName" inherit="false">SubThing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.SubTwoImpl" entity-name="SubTwo" abstract="false" lazy="false" extends="Annotation" table="`SUBTWO`"> + <meta attribute="eclassName" inherit="false">SubTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <key> + <column name="`ANNOTATION_NAME`"/> + </key> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InheritanceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InheritanceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..fe1014caf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InheritanceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,54 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.ThingImpl" entity-name="Thing" abstract="false" lazy="false" discriminator-value="Thing" table="`THING`"> + <meta attribute="eclassName" inherit="false">Thing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="THINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="things" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="THING_THINGS"> + <column name="`THING_THINGS_NAME`" unique="false"/> + </key> + <list-index column="`THING_THINGS_IDX`"/> + <one-to-many entity-name="SubThing"/> + </list> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.AnnotationImpl" entity-name="Annotation" abstract="false" lazy="false" extends="Thing" discriminator-value="Annotation"> + <meta attribute="eclassName" inherit="false">Annotation</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.InterestImpl" entity-name="Interest" abstract="false" lazy="false" extends="Thing" discriminator-value="Interest"> + <meta attribute="eclassName" inherit="false">Interest</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.SubOneImpl" entity-name="SubOne" abstract="false" lazy="false" extends="Annotation" discriminator-value="SubOne"> + <meta attribute="eclassName" inherit="false">SubOne</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + </subclass> + <class name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.SubThingImpl" entity-name="SubThing" abstract="false" lazy="false" discriminator-value="SubThing" table="`SUBTHING`"> + <meta attribute="eclassName" inherit="false">SubThing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SUBTHINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.inheritance.impl.SubTwoImpl" entity-name="SubTwo" abstract="false" lazy="false" extends="Annotation" discriminator-value="SubTwo"> + <meta attribute="eclassName" inherit="false">SubTwo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/inheritance</meta> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InterfaceTrueAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InterfaceTrueAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..40d51afac --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InterfaceTrueAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,47 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.interfacetrue.Address" entity-name="Address" abstract="true" lazy="false" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/issues/interfacetrue.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.interfacetrue.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" table="`USADDRESS`"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/issues/interfacetrue.ecore</meta> + <key> + <column name="`ADDRESS_E_ID`"/> + </key> + <property name="state" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`STATE`"/> + </property> + </joined-subclass> + <class name="org.eclipse.emf.teneo.samples.issues.interfacetrue.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" table="`ADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">AddressList</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/issues/interfacetrue.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="addresses" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ADDRESSLIST_ADDRESSES"> + <column name="`ADDRESSLIST_ADDRESSES_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESSLIST_ADDRESSES_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InterfaceTrueAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InterfaceTrueAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..95fff7245 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/InterfaceTrueAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,50 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.interfacetrue.Address" entity-name="Address" abstract="true" lazy="false" discriminator-value="Address" table="`ADDRESS`"> + <meta attribute="eclassName" inherit="false">Address</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/issues/interfacetrue.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.interfacetrue.impl.USAddressImpl" entity-name="USAddress" abstract="false" lazy="false" extends="Address" discriminator-value="USAddress"> + <meta attribute="eclassName" inherit="false">USAddress</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/issues/interfacetrue.ecore</meta> + <property name="state" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STATE`"/> + </property> + </subclass> + <class name="org.eclipse.emf.teneo.samples.issues.interfacetrue.impl.AddressListImpl" entity-name="AddressList" abstract="false" lazy="false" discriminator-value="AddressList" table="`ADDRESSLIST`"> + <meta attribute="eclassName" inherit="false">AddressList</meta> + <meta attribute="epackage" inherit="false">http:///org/elver/store/test/issues/interfacetrue.ecore</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ADDRESSLISTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <list name="addresses" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true" foreign-key="ADDRESSLIST_ADDRESSES"> + <column name="`ADDRESSLIST_ADDRESSES_E_ID`" unique="false"/> + </key> + <list-index column="`ADDRESSLIST_ADDRESSES_IDX`"/> + <one-to-many entity-name="Address"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c95f0dfef --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.largemapvalue.impl.TestElementImpl" entity-name="TestElement" abstract="false" lazy="false" table="`TESTELEMENT`"> + <meta attribute="eclassName" inherit="false">TestElement</meta> + <meta attribute="epackage" inherit="false">http://www.pubcurator.org/tester/testmodel</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <map name="testMap" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TESTELEMENT_TESTMAP_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="text" not-null="false" unique="false"> + <column not-null="false" unique="false" name="`VALUE`" length="1000000"/> + </element> + </map> + <property name="testProp" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`TESTPROP`" length="1000000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..4400aefd2 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,31 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.largemapvalue.impl.TestElementImpl" entity-name="TestElement" abstract="false" lazy="false" discriminator-value="TestElement" table="`TESTELEMENT`"> + <meta attribute="eclassName" inherit="false">TestElement</meta> + <meta attribute="epackage" inherit="false">http://www.pubcurator.org/tester/testmodel</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TESTELEMENTDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <map name="testMap" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`TESTELEMENT_TESTMAP_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="text" not-null="false" unique="false"> + <column not-null="false" unique="false" name="`VALUE`" length="1000000"/> + </element> + </map> + <property name="testProp" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`TESTPROP`" length="1000000"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MTMSameAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MTMSameAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..9751daa97 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MTMSameAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,35 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.mtmsame.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/mtmsame</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="mySide" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`ITEM_ITEM`"> + <key update="true"> + <column name="`ITEM_MYSIDE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Item" unique="false" foreign-key="ITEM_MYSIDE"> + <column name="`ITEM_YOURSIDE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="yourSide" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`ITEM_ITEM`"> + <key update="true"> + <column name="`ITEM_YOURSIDE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Item" unique="false" foreign-key="ITEM_YOURSIDE"> + <column name="`ITEM_MYSIDE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MTMSameAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MTMSameAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..ea17a5ef3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MTMSameAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.mtmsame.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/mtmsame</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ITEMDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <bag name="mySide" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`ITEM_ITEM`"> + <key update="true"> + <column name="`ITEM_MYSIDE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Item" unique="false" foreign-key="ITEM_MYSIDE"> + <column name="`ITEM_YOURSIDE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + <bag name="yourSide" lazy="true" cascade="merge,persist,save-update,lock,refresh" inverse="true" table="`ITEM_ITEM`"> + <key update="true"> + <column name="`ITEM_YOURSIDE_E_ID`" unique="false"/> + </key> + <many-to-many entity-name="Item" unique="false" foreign-key="ITEM_YOURSIDE"> + <column name="`ITEM_MYSIDE_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </bag> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MultipleInheritanceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MultipleInheritanceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..56b490ef3 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MultipleInheritanceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,112 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="testinheritance.impl.SomeBaseClassImpl" entity-name="SomeBaseClass" abstract="false" lazy="false" table="`SOMEBASECLASS`"> + <meta attribute="eclassName" inherit="false">SomeBaseClass</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="anotherProperty" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ANOTHERPROPERTY`"/> + </property> + </class> + <joined-subclass name="testinheritance.impl.SomeResourceImpl" entity-name="SomeResource" abstract="false" lazy="false" extends="SomeBaseClass" table="`SOMERESOURCE`"> + <meta attribute="eclassName" inherit="false">SomeResource</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <key> + <column name="`SOMEBASECLASS_E_ID`"/> + </key> + <property name="property" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PROPERTY`"/> + </property> + <list name="nameValuePairs" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`SOMERESOURCE_NAMEVALUEPAIRS_E_ID`" unique="false"/> + </key> + <list-index column="`SOMERESOURCE_NAMEVALUEPAIRS_IDX`"/> + <one-to-many entity-name="NameValuePair"/> + </list> + </joined-subclass> + <class name="testinheritance.impl.NameValuePairImpl" entity-name="NameValuePair" abstract="false" lazy="false" table="`NAMEVALUEPAIR`"> + <meta attribute="eclassName" inherit="false">NameValuePair</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="testinheritance.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="anotherProperty" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ANOTHERPROPERTY`"/> + </property> + </class> + <class name="testinheritance.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id name="testId" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TESTID`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="someReference" entity-name="SomeReference" lazy="false" cascade="merge,persist,save-update,lock,refresh" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SOMEREFERENCE_SOMEREFERENCE_NAME`"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + </class> + <joined-subclass name="testinheritance.impl.Child2Impl" entity-name="Child2" abstract="false" lazy="false" extends="ParentOne" table="`CHILD2`"> + <meta attribute="eclassName" inherit="false">Child2</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <key> + <column name="`PARENTZERO_E_ID`"/> + </key> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="someReference" entity-name="SomeReference" lazy="false" cascade="merge,persist,save-update,lock,refresh" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SOMEREFERENCE_SOMEREFERENCE_NAME`"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + </joined-subclass> + <class name="testinheritance.impl.SomeReferenceImpl" entity-name="SomeReference" abstract="false" lazy="false" table="`SOMEREFERENCE`"> + <meta attribute="eclassName" inherit="false">SomeReference</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MultipleInheritanceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MultipleInheritanceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..be8e48fed --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/MultipleInheritanceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,121 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="testinheritance.impl.SomeBaseClassImpl" entity-name="SomeBaseClass" abstract="false" lazy="false" discriminator-value="SomeBaseClass" table="`SOMEBASECLASS`"> + <meta attribute="eclassName" inherit="false">SomeBaseClass</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SOMEBASECLASSDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="anotherProperty" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ANOTHERPROPERTY`"/> + </property> + </class> + <subclass name="testinheritance.impl.SomeResourceImpl" entity-name="SomeResource" abstract="false" lazy="false" extends="SomeBaseClass" discriminator-value="SomeResource"> + <meta attribute="eclassName" inherit="false">SomeResource</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <property name="property" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PROPERTY`"/> + </property> + <list name="nameValuePairs" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`SOMERESOURCE_NAMEVALUEPAIRS_E_ID`" unique="false"/> + </key> + <list-index column="`SOMERESOURCE_NAMEVALUEPAIRS_IDX`"/> + <one-to-many entity-name="NameValuePair"/> + </list> + </subclass> + <class name="testinheritance.impl.NameValuePairImpl" entity-name="NameValuePair" abstract="false" lazy="false" discriminator-value="NameValuePair" table="`NAMEVALUEPAIR`"> + <meta attribute="eclassName" inherit="false">NameValuePair</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="NAMEVALUEPAIRDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="testinheritance.impl.ParentOneImpl" entity-name="ParentOne" abstract="false" lazy="false" discriminator-value="ParentOne" table="`PARENTONE`"> + <meta attribute="eclassName" inherit="false">ParentOne</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PARENTONEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="anotherProperty" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`ANOTHERPROPERTY`"/> + </property> + </class> + <class name="testinheritance.impl.ChildImpl" entity-name="Child" abstract="false" lazy="false" discriminator-value="Child" table="`CHILD`"> + <meta attribute="eclassName" inherit="false">Child</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id name="testId" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TESTID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="CHILDDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="someReference" entity-name="SomeReference" lazy="false" cascade="merge,persist,save-update,lock,refresh" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`SOMEREFERENCE_SOMEREFERENCE_NAME`"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + </class> + <subclass name="testinheritance.impl.Child2Impl" entity-name="Child2" abstract="false" lazy="false" extends="ParentOne" discriminator-value="Child2"> + <meta attribute="eclassName" inherit="false">Child2</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + <many-to-one name="someReference" entity-name="SomeReference" lazy="false" cascade="merge,persist,save-update,lock,refresh" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`SOMEREFERENCE_SOMEREFERENCE_NAME`"/> + </many-to-one> + <property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`AGE`"/> + </property> + </subclass> + <class name="testinheritance.impl.SomeReferenceImpl" entity-name="SomeReference" abstract="false" lazy="false" discriminator-value="SomeReference" table="`SOMEREFERENCE`"> + <meta attribute="eclassName" inherit="false">SomeReference</meta> + <meta attribute="epackage" inherit="false">http://xsd.tns.example.com/testinheritance/model</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="SOMEREFERENCEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..d52ff1783 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,28 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.resource.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resource</meta> + <id name="hair" type="java.lang.String"> + <column not-null="true" unique="false" name="`HAIR`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.resource.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resource</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="head" entity-name="Head" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_HEAD" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HEAD_HEAD_HAIR`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..697b3b774 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,34 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.resource.impl.HeadImpl" entity-name="Head" abstract="false" lazy="false" discriminator-value="Head" table="`HEAD`"> + <meta attribute="eclassName" inherit="false">Head</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resource</meta> + <id name="hair" type="java.lang.String"> + <column not-null="true" unique="false" name="`HAIR`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="HEADDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.resource.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`PERSON`"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resource</meta> + <id name="name" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="head" entity-name="Head" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PERSON_HEAD" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`HEAD_HEAD_HAIR`"/> + </many-to-one> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceUnloadAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceUnloadAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..70eb700fc --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceUnloadAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,40 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.resourceunload.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resourceunload</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.resourceunload.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resourceunload</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceUnloadAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceUnloadAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..cb610fce0 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/ResourceUnloadAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,46 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.resourceunload.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resourceunload</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.resourceunload.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/resourceunload</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SecondarytableInheritanceAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SecondarytableInheritanceAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..f56c00e49 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SecondarytableInheritanceAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.secondary.impl.GenericImpl" entity-name="Generic" abstract="false" lazy="false" discriminator-value="Generic" table="`GENERIC`"> + <meta attribute="eclassName" inherit="false">Generic</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/secondary</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="GENERICDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.secondary.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" extends="Generic" discriminator-value="Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/secondary</meta> + <join table="`PERSON_ADDRESS`"> + <key> + <column name="`ID`"/> + </key> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </join> + <join table="`PERSON_PHOTO`"> + <key> + <column name="`ID`"/> + </key> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </join> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SecondarytableInheritanceAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SecondarytableInheritanceAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..f56c00e49 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SecondarytableInheritanceAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,38 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.secondary.impl.GenericImpl" entity-name="Generic" abstract="false" lazy="false" discriminator-value="Generic" table="`GENERIC`"> + <meta attribute="eclassName" inherit="false">Generic</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/secondary</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="GENERICDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.secondary.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" extends="Generic" discriminator-value="Person"> + <meta attribute="eclassName" inherit="false">Person</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/secondary</meta> + <join table="`PERSON_ADDRESS`"> + <key> + <column name="`ID`"/> + </key> + <property name="address" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`ADDRESS`"/> + </property> + </join> + <join table="`PERSON_PHOTO`"> + <key> + <column name="`ID`"/> + </key> + <property name="photo" lazy="false" insert="true" update="true" not-null="false" unique="false" type="binary"> + <column not-null="false" unique="false" name="`PHOTO`" length="1000000"/> + </property> + </join> + </subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SimplenmAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SimplenmAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..297bae6e4 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SimplenmAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,51 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.simplenm.impl.MeImpl" entity-name="Me" abstract="false" lazy="false" table="`ME`"> + <meta attribute="eclassName" inherit="false">Me</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/simplenm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="you" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`ME_YOU`"> + <key update="true"> + <column name="`ME_E_ID`" unique="false"/> + </key> + <list-index column="`ME_YOU_IDX`"/> + <many-to-many entity-name="You" unique="false" foreign-key="ME_YOU"> + <column name="`YOU_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.simplenm.impl.YouImpl" entity-name="You" abstract="false" lazy="false" table="`YOU`"> + <meta attribute="eclassName" inherit="false">You</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/simplenm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="me" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`YOU_ME`"> + <key update="true"> + <column name="`YOU_E_ID`" unique="false"/> + </key> + <list-index column="`YOU_ME_IDX`"/> + <many-to-many entity-name="Me" unique="false" foreign-key="YOU_ME"> + <column name="`ME_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SimplenmAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SimplenmAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..b60ff6e90 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SimplenmAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,57 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.simplenm.impl.MeImpl" entity-name="Me" abstract="false" lazy="false" discriminator-value="Me" table="`ME`"> + <meta attribute="eclassName" inherit="false">Me</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/simplenm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="MEDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="you" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`ME_YOU`"> + <key update="true"> + <column name="`ME_E_ID`" unique="false"/> + </key> + <list-index column="`ME_YOU_IDX`"/> + <many-to-many entity-name="You" unique="false" foreign-key="ME_YOU"> + <column name="`YOU_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.simplenm.impl.YouImpl" entity-name="You" abstract="false" lazy="false" discriminator-value="You" table="`YOU`"> + <meta attribute="eclassName" inherit="false">You</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/simplenm</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="YOUDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + <list name="me" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`YOU_ME`"> + <key update="true"> + <column name="`YOU_E_ID`" unique="false"/> + </key> + <list-index column="`YOU_ME_IDX`"/> + <many-to-many entity-name="Me" unique="false" foreign-key="YOU_ME"> + <column name="`ME_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SupInterfacesAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SupInterfacesAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..67f3f9f6a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SupInterfacesAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,92 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.issues.library.Book" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`" length="50"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.library.Library" entity-name="Library" abstract="false" lazy="false" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.library.Writer" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SupInterfacesAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SupInterfacesAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..aae1853bd --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/SupInterfacesAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,101 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`" length="50"/> + </property> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`PAGES`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`CATEGORY`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.library.BookCategory</param> + <param name="eclassifier">BookCategory</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOK_AUTHOR" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`BOOK_AUTHOR_E_ID`"/> + </many-to-one> + </class> + <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`LIBRARY`"> + <meta attribute="eclassName" inherit="false">Library</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="LIBRARYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="schrijvers"> + <column name="`LIBRARY_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_WRITERS_IDX`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true" foreign-key="LIBRARY_BOOKS"> + <column name="`LIBRARY_BOOKS_E_ID`" unique="false"/> + </key> + <list-index column="`LIBRARY_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/supinterfaces</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`" length="50"/> + </property> + <list name="books" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <cache usage="read-write"/> + <key update="true"> + <column name="`BOOK_AUTHOR_E_ID`" unique="false"/> + </key> + <list-index column="`WRITER_BOOKS_IDX`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/TopClassesAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/TopClassesAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..95a373729 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/TopClassesAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,92 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.AbstractSuperImpl" entity-name="AbstractSuper" abstract="false" lazy="false" table="`ABSTRACTSUPER`"> + <meta attribute="eclassName" inherit="false">AbstractSuper</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.MImpl" entity-name="M" abstract="false" lazy="false" extends="AbstractSuper" table="`M`"> + <meta attribute="eclassName" inherit="false">M</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <key> + <column name="`ABSTRACTSUPER_E_ID`"/> + </key> + <list name="p" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`M_P`"> + <key update="true"> + <column name="`M_E_ID`" unique="false"/> + </key> + <list-index column="`M_P_IDX`"/> + <many-to-many entity-name="P" unique="false" foreign-key="M_P"> + <column name="`P_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.MListImpl" entity-name="MList" abstract="false" lazy="false" extends="AbstractSuper" table="`MLIST`"> + <meta attribute="eclassName" inherit="false">MList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <key> + <column name="`ABSTRACTSUPER_E_ID`"/> + </key> + <list name="m" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MLIST_M"> + <column name="`MLIST_M_E_ID`" unique="false"/> + </key> + <list-index column="`MLIST_M_IDX`"/> + <one-to-many entity-name="M"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.PImpl" entity-name="P" abstract="false" lazy="false" extends="AbstractSuper" table="`P`"> + <meta attribute="eclassName" inherit="false">P</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <key> + <column name="`ABSTRACTSUPER_E_ID`"/> + </key> + <list name="m" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`P_M`"> + <key update="true"> + <column name="`P_E_ID`" unique="false"/> + </key> + <list-index column="`P_M_IDX`"/> + <many-to-many entity-name="M" unique="false" foreign-key="P_M"> + <column name="`M_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.PListImpl" entity-name="PList" abstract="false" lazy="false" extends="AbstractSuper" table="`PLIST`"> + <meta attribute="eclassName" inherit="false">PList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <key> + <column name="`ABSTRACTSUPER_E_ID`"/> + </key> + <list name="p" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PLIST_P"> + <column name="`PLIST_P_E_ID`" unique="false"/> + </key> + <list-index column="`PLIST_P_IDX`"/> + <one-to-many entity-name="P"/> + </list> + </joined-subclass> + <joined-subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.RImpl" entity-name="R" abstract="false" lazy="false" extends="AbstractSuper" table="`R`"> + <meta attribute="eclassName" inherit="false">R</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <key> + <column name="`ABSTRACTSUPER_E_ID`"/> + </key> + <many-to-one name="plist" entity-name="PList" lazy="false" cascade="all" foreign-key="R_PLIST" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`PLIST_PLIST_E_ID`"/> + </many-to-one> + <many-to-one name="mlist" entity-name="MList" lazy="false" cascade="all" foreign-key="R_MLIST" insert="true" update="true" not-null="true" unique="true"> + <column not-null="true" unique="false" name="`MLIST_MLIST_E_ID`"/> + </many-to-one> + </joined-subclass> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/TopClassesAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/TopClassesAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..5bf8911b6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/TopClassesAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,80 @@ +<?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"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.AbstractSuperImpl" entity-name="AbstractSuper" abstract="false" lazy="false" discriminator-value="AbstractSuper" table="`ABSTRACTSUPER`"> + <meta attribute="eclassName" inherit="false">AbstractSuper</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="ABSTRACTSUPERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> + <subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.MImpl" entity-name="M" abstract="false" lazy="false" extends="AbstractSuper" discriminator-value="M"> + <meta attribute="eclassName" inherit="false">M</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <list name="p" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`M_P`"> + <key update="true"> + <column name="`M_E_ID`" unique="false"/> + </key> + <list-index column="`M_P_IDX`"/> + <many-to-many entity-name="P" unique="false" foreign-key="M_P"> + <column name="`P_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.MListImpl" entity-name="MList" abstract="false" lazy="false" extends="AbstractSuper" discriminator-value="MList"> + <meta attribute="eclassName" inherit="false">MList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <list name="m" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="MLIST_M"> + <column name="`MLIST_M_E_ID`" unique="false"/> + </key> + <list-index column="`MLIST_M_IDX`"/> + <one-to-many entity-name="M"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.PImpl" entity-name="P" abstract="false" lazy="false" extends="AbstractSuper" discriminator-value="P"> + <meta attribute="eclassName" inherit="false">P</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <list name="m" lazy="true" cascade="merge,persist,save-update,lock,refresh" table="`P_M`"> + <key update="true"> + <column name="`P_E_ID`" unique="false"/> + </key> + <list-index column="`P_M_IDX`"/> + <many-to-many entity-name="M" unique="false" foreign-key="P_M"> + <column name="`M_E_ID`" not-null="true" unique="false"/> + </many-to-many> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.PListImpl" entity-name="PList" abstract="false" lazy="false" extends="AbstractSuper" discriminator-value="PList"> + <meta attribute="eclassName" inherit="false">PList</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <list name="p" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="PLIST_P"> + <column name="`PLIST_P_E_ID`" unique="false"/> + </key> + <list-index column="`PLIST_P_IDX`"/> + <one-to-many entity-name="P"/> + </list> + </subclass> + <subclass name="org.eclipse.emf.teneo.samples.issues.topclasses.impl.RImpl" entity-name="R" abstract="false" lazy="false" extends="AbstractSuper" discriminator-value="R"> + <meta attribute="eclassName" inherit="false">R</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/store/test/issues/topclasses</meta> + <many-to-one name="plist" entity-name="PList" lazy="false" cascade="all" foreign-key="R_PLIST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`PLIST_PLIST_E_ID`"/> + </many-to-one> + <many-to-one name="mlist" entity-name="MList" lazy="false" cascade="all" foreign-key="R_MLIST" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`MLIST_MLIST_E_ID`"/> + </many-to-one> + </subclass> +</hibernate-mapping>
\ No newline at end of file |