diff options
author | Martin Taal | 2011-11-03 15:53:06 +0000 |
---|---|---|
committer | Martin Taal | 2011-11-03 15:53:06 +0000 |
commit | 875e4b17b15cf2154d2f9ecf8ac16f0cfebee8af (patch) | |
tree | 5d930ced0ddeb1fc343a90d9e949489e1069291f | |
parent | c45fa56248444f97608b89998641f9e42a09ef7e (diff) | |
download | org.eclipse.emf.teneo-875e4b17b15cf2154d2f9ecf8ac16f0cfebee8af.tar.gz org.eclipse.emf.teneo-875e4b17b15cf2154d2f9ecf8ac16f0cfebee8af.tar.xz org.eclipse.emf.teneo-875e4b17b15cf2154d2f9ecf8ac16f0cfebee8af.zip |
Regenerated hbm files
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/ |