diff options
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test')
20 files changed, 1727 insertions, 309 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingTrueEMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingTrueEMapAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..916bb6cd9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingTrueEMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,391 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <one-to-many entity-name="Writer"/> + </map> + <map name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <map-key-many-to-many entity-name="Writer"/> + <element type="java.lang.String"/> + </map> + <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <map-key type="timestamp"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </element> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditCommitInfoImpl" entity-name="TeneoAuditCommitInfo" abstract="false" lazy="false" table="`TENEOAUDITCOMMITINFO`"> + <meta attribute="eclassName" inherit="false">TeneoAuditCommitInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/hibernate/auditing</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="user" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`USER`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="BookAuditing" abstract="false" lazy="false" table="`BOOKAUDITING`"> + <meta attribute="eclassName" inherit="false">BookAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOKAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_WRITERS"> + <column name="`BOOKAUDITING_WRITERS_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_KEYWORDS"> + <column name="`BOOKAUDITING_KEYWORDS_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntryAuditing"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CITYBYWRITER"> + <column name="`BOOKAUDITING_CITYBYWRITER_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntryAuditing"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CATEGORYBYDATE"> + <column name="`BOOKAUDITING_CATEGORYBYDATE_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntryAuditing"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToWriterMapEntryAuditing" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToStringMapEntryAuditing" abstract="false" lazy="false" table="`STRINGTOSTRINGMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToStringMapEntryAuditing" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DateToCategoryMapEntryAuditing" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DATETOCATEGORYMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterAuditing" abstract="false" lazy="false" table="`WRITERAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </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> +</hibernate-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.auditing/EMapAuditingTrueEMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingTrueEMapAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..ccb1fe348 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingTrueEMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,418 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <map name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <one-to-many entity-name="Writer"/> + </map> + <map name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <map-key type="java.lang.String"/> + <element type="java.lang.String"/> + </map> + <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <map-key-many-to-many entity-name="Writer"/> + <element type="java.lang.String"/> + </map> + <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <map-key type="timestamp"/> + <element> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </element> + </map> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditCommitInfoImpl" entity-name="TeneoAuditCommitInfo" abstract="false" lazy="false" discriminator-value="TeneoAuditCommitInfo" table="`TENEOAUDITCOMMITINFO`"> + <meta attribute="eclassName" inherit="false">TeneoAuditCommitInfo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/hibernate/auditing</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="TENEOAUDITCOMMITINFODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="version" type="long"> + <column not-null="true" unique="false" name="`VERSION`"/> + </version> + <property name="user" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`USER`"/> + </property> + <property name="comment" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> + <column not-null="false" unique="false" name="`COMMENT`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="BookAuditing" abstract="false" lazy="false" discriminator-value="BookAuditing" table="`BOOKAUDITING`"> + <meta attribute="eclassName" inherit="false">BookAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKAUDITINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BOOKAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_WRITERS"> + <column name="`BOOKAUDITING_WRITERS_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_KEYWORDS"> + <column name="`BOOKAUDITING_KEYWORDS_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntryAuditing"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CITYBYWRITER"> + <column name="`BOOKAUDITING_CITYBYWRITER_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntryAuditing"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CATEGORYBYDATE"> + <column name="`BOOKAUDITING_CATEGORYBYDATE_TENEO_AUDIT_ID`" unique="false"/> + </key> + <list-index column="`BOOKAUDITING_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntryAuditing"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToWriterMapEntryAuditing" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntryAuditing" table="`STRINGTOWRITERMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToStringMapEntryAuditing" abstract="false" lazy="false" discriminator-value="StringToStringMapEntryAuditing" table="`STRINGTOSTRINGMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOSTRINGMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToStringMapEntryAuditing" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntryAuditing" table="`WRITERTOSTRINGMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DateToCategoryMapEntryAuditing" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntryAuditing" table="`DATETOCATEGORYMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntryAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DATETOCATEGORYMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </property> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterAuditing" abstract="false" lazy="false" discriminator-value="WriterAuditing" table="`WRITERAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterAuditing</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> + <id name="teneo_audit_id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERAUDITINGDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="teneo_version" type="long"> + <column not-null="true" unique="false" name="`TENEO_VERSION`"/> + </version> + <property name="teneo_object_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_OBJECT_ID`"/> + </property> + <property name="teneo_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_START`"/> + </property> + <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_END`"/> + </property> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> + </many-to-one> + <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" unique="false" name="`TENEO_AUDIT_KIND`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind</param> + <param name="eclassifier">TeneoAuditKind</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/hibernate/auditing</param> + </type> + </property> + <property name="teneo_container_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_ID`"/> + </property> + <property name="teneo_container_feature_id" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`TENEO_CONTAINER_FEATURE_ID`"/> + </property> + <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> + </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> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml index 203ce9d87..f25261344 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -19,40 +19,90 @@ <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`TITLE`"/> </property> - <map name="writers" lazy="true" cascade="all,delete-orphan"> + <list name="writers" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="BOOK_WRITERS"> <column name="`BOOK_WRITERS_E_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <one-to-many entity-name="Writer"/> - </map> - <map name="keyWords" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <element type="java.lang.String"/> - </map> - <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> </key> - <map-key-many-to-many entity-name="Writer"/> - <element type="java.lang.String"/> - </map> - <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> </key> - <map-key type="timestamp"/> - <element> - <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> - <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> - <param name="eclassifier">Category</param> - <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> - </type> - </element> - </map> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> </class> <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> <meta attribute="eclassName" inherit="false">Writer</meta> @@ -68,6 +118,23 @@ <column not-null="true" unique="false" name="`NAME`"/> </property> </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditCommitInfoImpl" entity-name="TeneoAuditCommitInfo" abstract="false" lazy="false" table="`TENEOAUDITCOMMITINFO`"> <meta attribute="eclassName" inherit="false">TeneoAuditCommitInfo</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/hibernate/auditing</meta> @@ -127,43 +194,37 @@ <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`TITLE`"/> </property> - <map name="writers" lazy="true" cascade="all,delete-orphan"> + <list name="writers" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="BOOKAUDITING_WRITERS"> <column name="`BOOKAUDITING_WRITERS_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <one-to-many entity-name="Writer"/> - </map> - <map name="keyWords" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOKAUDITING_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_KEYWORDS"> <column name="`BOOKAUDITING_KEYWORDS_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <element type="java.lang.String"/> - </map> - <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOKAUDITING_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntryAuditing"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CITYBYWRITER"> <column name="`BOOKAUDITING_CITYBYWRITER_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key-many-to-many entity-name="Writer"/> - <element type="java.lang.String"/> - </map> - <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOKAUDITING_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntryAuditing"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CATEGORYBYDATE"> <column name="`BOOKAUDITING_CATEGORYBYDATE_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="timestamp"/> - <element> - <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> - <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> - <param name="eclassifier">Category</param> - <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> - </type> - </element> - </map> + <list-index column="`BOOKAUDITING_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntryAuditing"/> + </list> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DateToCategoryMapEntryAuditing" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">DateToCategoryMapEntryAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToWriterMapEntryAuditing" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -181,7 +242,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DATETOCATEGORYMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -201,16 +262,11 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`KEY`"/> </property> - <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`VALUE`"/> - <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> - <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> - <param name="eclassifier">Category</param> - <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> - </type> </property> </class> <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToStringMapEntryAuditing" abstract="false" lazy="false" table="`STRINGTOSTRINGMAPENTRYAUDITING`"> @@ -259,8 +315,8 @@ <column not-null="false" unique="false" name="`VALUE`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToWriterMapEntryAuditing" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">StringToWriterMapEntryAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToStringMapEntryAuditing" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -278,7 +334,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -305,8 +361,8 @@ <column not-null="false" unique="false" name="`VALUE`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterAuditing" abstract="false" lazy="false" table="`WRITERAUDITING`"> - <meta attribute="eclassName" inherit="false">WriterAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DateToCategoryMapEntryAuditing" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -324,7 +380,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DATETOCATEGORYMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -344,12 +400,20 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </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 name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToStringMapEntryAuditing" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">WriterToStringMapEntryAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterAuditing" abstract="false" lazy="false" table="`WRITERAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -367,7 +431,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -387,11 +451,8 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`KEY`"/> - </property> - <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`VALUE`"/> + <property 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.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml index b8e520084..85c8d5d32 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -22,40 +22,99 @@ <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`TITLE`"/> </property> - <map name="writers" lazy="true" cascade="all,delete-orphan"> + <list name="writers" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="BOOK_WRITERS"> <column name="`BOOK_WRITERS_E_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <one-to-many entity-name="Writer"/> - </map> - <map name="keyWords" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <element type="java.lang.String"/> - </map> - <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> </key> - <map-key-many-to-many entity-name="Writer"/> - <element type="java.lang.String"/> - </map> - <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> </key> - <map-key type="timestamp"/> - <element> - <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> - <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> - <param name="eclassifier">Category</param> - <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> - </type> - </element> - </map> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntry" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" discriminator-value="StringToStringMapEntry" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntry" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> </class> <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> <meta attribute="eclassName" inherit="false">Writer</meta> @@ -74,6 +133,26 @@ <column not-null="true" unique="false" name="`NAME`"/> </property> </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntry" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditCommitInfoImpl" entity-name="TeneoAuditCommitInfo" abstract="false" lazy="false" discriminator-value="TeneoAuditCommitInfo" table="`TENEOAUDITCOMMITINFO`"> <meta attribute="eclassName" inherit="false">TeneoAuditCommitInfo</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/hibernate/auditing</meta> @@ -139,50 +218,44 @@ <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`TITLE`"/> </property> - <map name="writers" lazy="true" cascade="all,delete-orphan"> + <list name="writers" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="BOOKAUDITING_WRITERS"> <column name="`BOOKAUDITING_WRITERS_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <one-to-many entity-name="Writer"/> - </map> - <map name="keyWords" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOKAUDITING_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_KEYWORDS"> <column name="`BOOKAUDITING_KEYWORDS_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <element type="java.lang.String"/> - </map> - <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOKAUDITING_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntryAuditing"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CITYBYWRITER"> <column name="`BOOKAUDITING_CITYBYWRITER_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key-many-to-many entity-name="Writer"/> - <element type="java.lang.String"/> - </map> - <map name="categoryByDate" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list-index column="`BOOKAUDITING_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntryAuditing"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOKAUDITING_CATEGORYBYDATE"> <column name="`BOOKAUDITING_CATEGORYBYDATE_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="timestamp"/> - <element> - <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> - <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> - <param name="eclassifier">Category</param> - <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> - </type> - </element> - </map> + <list-index column="`BOOKAUDITING_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntryAuditing"/> + </list> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DateToCategoryMapEntryAuditing" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntryAuditing" table="`DATETOCATEGORYMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">DateToCategoryMapEntryAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToWriterMapEntryAuditing" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntryAuditing" table="`STRINGTOWRITERMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> <discriminator type="string"> - <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> @@ -196,7 +269,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DATETOCATEGORYMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -216,16 +289,11 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`KEY`"/> </property> - <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`VALUE`"/> - <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> - <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> - <param name="eclassifier">Category</param> - <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> - </type> </property> </class> <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToStringMapEntryAuditing" abstract="false" lazy="false" discriminator-value="StringToStringMapEntryAuditing" table="`STRINGTOSTRINGMAPENTRYAUDITING`"> @@ -277,15 +345,15 @@ <column not-null="false" unique="false" name="`VALUE`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="StringToWriterMapEntryAuditing" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntryAuditing" table="`STRINGTOWRITERMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">StringToWriterMapEntryAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToStringMapEntryAuditing" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntryAuditing" table="`WRITERTOSTRINGMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> <discriminator type="string"> - <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> @@ -299,7 +367,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -326,15 +394,15 @@ <column not-null="false" unique="false" name="`VALUE`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterAuditing" abstract="false" lazy="false" discriminator-value="WriterAuditing" table="`WRITERAUDITING`"> - <meta attribute="eclassName" inherit="false">WriterAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DateToCategoryMapEntryAuditing" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntryAuditing" table="`DATETOCATEGORYMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> <discriminator type="string"> - <column name="`DTYPE`" index="WRITERAUDITINGDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> @@ -348,7 +416,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DATETOCATEGORYMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -368,19 +436,27 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </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 name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToStringMapEntryAuditing" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntryAuditing" table="`WRITERTOSTRINGMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">WriterToStringMapEntryAuditing</meta> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterAuditing" abstract="false" lazy="false" discriminator-value="WriterAuditing" table="`WRITERAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> <discriminator type="string"> - <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> + <column name="`DTYPE`" index="WRITERAUDITINGDTYPE" length="255" not-null="true"/> </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> @@ -394,7 +470,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRYAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -414,11 +490,8 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`KEY`"/> - </property> - <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`VALUE`"/> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> </property> </class> </hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml index 80ffb936b..249ed9d95 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_e_o_hibernate.hbm.xml @@ -425,7 +425,7 @@ <column not-null="false" unique="false" name="`NAME`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="carAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.example.com/car.xsdAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> @@ -444,7 +444,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CARAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -464,16 +464,13 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="carAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="carsList" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CARSLIST`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="carAuditing.DocumentRootAuditing_mixed" lazy="false" table="`CARAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">carAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -481,6 +478,9 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="carsList" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_CARSLIST`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml index 683f459fc..2a8f817f5 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/CarAction_hsqldb_h_o_hibernate.hbm.xml @@ -464,16 +464,13 @@ <column not-null="false" unique="false" name="`NAME`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" discriminator-value="DocumentRootAuditing" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="carAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.example.com/car.xsdAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> - <discriminator type="string"> - <column name="`DTYPE`" index="DOCUMENTROOTAUDITINGDTYPE" length="255" not-null="true"/> - </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> </version> @@ -486,7 +483,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="CARAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -506,16 +503,13 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="carAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="carsList" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CARSLIST`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="carAuditing.DocumentRootAuditing_mixed" lazy="false" table="`CARAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">carAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -523,6 +517,9 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="carsList" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_CARSLIST`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml index e194575a4..05f330ff1 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_e_o_hibernate.hbm.xml @@ -423,7 +423,7 @@ <column not-null="false" unique="false" name="`PUBLISHERDEFINITIONREF`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="testAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsdAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> @@ -442,7 +442,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TESTAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -462,16 +462,25 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="testAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="abstractBookDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ABSTRACTBOOKDEFINITION`"/> + </property> + <property name="adultBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADULTBOOKS`"/> + </property> + <property name="booksinlib" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BOOKSINLIB`"/> + </property> + <property name="childrenBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CHILDRENBOOKS`"/> + </property> + <property name="publisherDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PUBLISHERDEFINITION`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="testAuditing.DocumentRootAuditing_mixed" lazy="false" table="`TESTAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">testAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -479,6 +488,21 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="abstractBookDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ABSTRACTBOOKDEFINITION`"/> + </property> + <property name="adultBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ADULTBOOKS`"/> + </property> + <property name="booksinlib" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_BOOKSINLIB`"/> + </property> + <property name="childrenBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_CHILDRENBOOKS`"/> + </property> + <property name="publisherDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PUBLISHERDEFINITION`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml index 3304625e9..91db51e96 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/JuliaAction_hsqldb_h_o_hibernate.hbm.xml @@ -441,16 +441,13 @@ <column not-null="false" unique="false" name="`PUBLISHERDEFINITIONREF`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" discriminator-value="DocumentRootAuditing" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="testAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-portal-test.xsdAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> - <discriminator type="string"> - <column name="`DTYPE`" index="DOCUMENTROOTAUDITINGDTYPE" length="255" not-null="true"/> - </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> </version> @@ -463,7 +460,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="TESTAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -483,16 +480,25 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="testAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="abstractBookDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ABSTRACTBOOKDEFINITION`"/> + </property> + <property name="adultBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ADULTBOOKS`"/> + </property> + <property name="booksinlib" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`BOOKSINLIB`"/> + </property> + <property name="childrenBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CHILDRENBOOKS`"/> + </property> + <property name="publisherDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PUBLISHERDEFINITION`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="testAuditing.DocumentRootAuditing_mixed" lazy="false" table="`TESTAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">testAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -500,6 +506,21 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="abstractBookDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ABSTRACTBOOKDEFINITION`"/> + </property> + <property name="adultBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ADULTBOOKS`"/> + </property> + <property name="booksinlib" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_BOOKSINLIB`"/> + </property> + <property name="childrenBooks" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_CHILDRENBOOKS`"/> + </property> + <property name="publisherDefinition" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PUBLISHERDEFINITION`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml index 807fba613..b7df08e38 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -227,7 +227,7 @@ <column not-null="false" unique="false" name="`COMMENT`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="mindmapAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.example.org/mindmapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> @@ -246,7 +246,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MINDMAPAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -266,16 +266,13 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="mindmapAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="map" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAP`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="mindmapAuditing.DocumentRootAuditing_mixed" lazy="false" table="`MINDMAPAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">mindmapAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -283,6 +280,9 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="map" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_MAP`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml index 69d0ece85..91db4af56 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/MindMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -248,16 +248,13 @@ <column not-null="false" unique="false" name="`COMMENT`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" discriminator-value="DocumentRootAuditing" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="mindmapAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.example.org/mindmapAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> - <discriminator type="string"> - <column name="`DTYPE`" index="DOCUMENTROOTAUDITINGDTYPE" length="255" not-null="true"/> - </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> </version> @@ -270,7 +267,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="MINDMAPAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -290,16 +287,13 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="mindmapAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="map" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MAP`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="mindmapAuditing.DocumentRootAuditing_mixed" lazy="false" table="`MINDMAPAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">mindmapAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -307,6 +301,9 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="map" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_MAP`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml index 3a6ccda7c..a5cd4adbc 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_e_o_hibernate.hbm.xml @@ -282,7 +282,7 @@ <column not-null="false" unique="false" name="`TITLE`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="playAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/playAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> @@ -301,7 +301,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PLAYAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -321,16 +321,58 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="playAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="act" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ACT`"/> + </property> + <property name="fm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FM`"/> + </property> + <property name="groupDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUPDESCRIPTION`"/> + </property> + <property name="line" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LINE`"/> + </property> + <property name="p" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`P`"/> + </property> + <property name="persona" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PERSONA`"/> + </property> + <property name="personae" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PERSONAE`"/> + </property> + <property name="personaGroup" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PERSONAGROUP`"/> + </property> + <property name="play" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PLAY`"/> + </property> + <property name="playSubTitle" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PLAYSUBTITLE`"/> + </property> + <property name="scene" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SCENE`"/> + </property> + <property name="sceneDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SCENEDESCRIPTION`"/> + </property> + <property name="speaker" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPEAKER`"/> + </property> + <property name="speech" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPEECH`"/> + </property> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STAGEDIRECTIONS`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="playAuditing.DocumentRootAuditing_mixed" lazy="false" table="`PLAYAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">playAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -338,6 +380,54 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="act" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ACT`"/> + </property> + <property name="fm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_FM`"/> + </property> + <property name="groupDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_GROUPDESCRIPTION`"/> + </property> + <property name="line" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_LINE`"/> + </property> + <property name="p" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_P`"/> + </property> + <property name="persona" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PERSONA`"/> + </property> + <property name="personae" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PERSONAE`"/> + </property> + <property name="personaGroup" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PERSONAGROUP`"/> + </property> + <property name="play" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PLAY`"/> + </property> + <property name="playSubTitle" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PLAYSUBTITLE`"/> + </property> + <property name="scene" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SCENE`"/> + </property> + <property name="sceneDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SCENEDESCRIPTION`"/> + </property> + <property name="speaker" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SPEAKER`"/> + </property> + <property name="speech" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SPEECH`"/> + </property> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_STAGEDIRECTIONS`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_TITLE`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml index 57ad52713..dedc681e4 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PlayAction_hsqldb_h_o_hibernate.hbm.xml @@ -309,16 +309,13 @@ <column not-null="false" unique="false" name="`TITLE`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" discriminator-value="DocumentRootAuditing" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="playAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/playAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> - <discriminator type="string"> - <column name="`DTYPE`" index="DOCUMENTROOTAUDITINGDTYPE" length="255" not-null="true"/> - </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> </version> @@ -331,7 +328,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="PLAYAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -351,16 +348,58 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="playAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="act" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ACT`"/> + </property> + <property name="fm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`FM`"/> + </property> + <property name="groupDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`GROUPDESCRIPTION`"/> + </property> + <property name="line" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`LINE`"/> + </property> + <property name="p" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`P`"/> + </property> + <property name="persona" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PERSONA`"/> + </property> + <property name="personae" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PERSONAE`"/> + </property> + <property name="personaGroup" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PERSONAGROUP`"/> + </property> + <property name="play" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PLAY`"/> + </property> + <property name="playSubTitle" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`PLAYSUBTITLE`"/> + </property> + <property name="scene" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SCENE`"/> + </property> + <property name="sceneDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SCENEDESCRIPTION`"/> + </property> + <property name="speaker" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPEAKER`"/> + </property> + <property name="speech" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`SPEECH`"/> + </property> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`STAGEDIRECTIONS`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`TITLE`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="playAuditing.DocumentRootAuditing_mixed" lazy="false" table="`PLAYAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">playAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -368,6 +407,54 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="act" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ACT`"/> + </property> + <property name="fm" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_FM`"/> + </property> + <property name="groupDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_GROUPDESCRIPTION`"/> + </property> + <property name="line" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_LINE`"/> + </property> + <property name="p" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_P`"/> + </property> + <property name="persona" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PERSONA`"/> + </property> + <property name="personae" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PERSONAE`"/> + </property> + <property name="personaGroup" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PERSONAGROUP`"/> + </property> + <property name="play" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PLAY`"/> + </property> + <property name="playSubTitle" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_PLAYSUBTITLE`"/> + </property> + <property name="scene" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SCENE`"/> + </property> + <property name="sceneDescription" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SCENEDESCRIPTION`"/> + </property> + <property name="speaker" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SPEAKER`"/> + </property> + <property name="speech" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_SPEECH`"/> + </property> + <property name="stageDirections" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_STAGEDIRECTIONS`"/> + </property> + <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_TITLE`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml index 6ad3f2d05..7feb32ab8 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_e_o_hibernate.hbm.xml @@ -107,7 +107,7 @@ <column not-null="false" unique="false" name="`COMMENT`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="schemaprimerpoAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpoAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> @@ -126,7 +126,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="SCHEMAPRIMERPOAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -146,16 +146,16 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="schemaprimerpoAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <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="order" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ORDER`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="schemaprimerpoAuditing.DocumentRootAuditing_mixed" lazy="false" table="`SCHEMAPRIMERPOAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">schemaprimerpoAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -163,6 +163,12 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <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="`MIXED_COMMENT`"/> + </property> + <property name="order" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ORDER`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml index f1c8faedb..5f1e9687e 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/PrimerPOAction_hsqldb_h_o_hibernate.hbm.xml @@ -119,16 +119,13 @@ <column not-null="false" unique="false" name="`COMMENT`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" discriminator-value="DocumentRootAuditing" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="schemaprimerpoAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/schemaprimerpoAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> - <discriminator type="string"> - <column name="`DTYPE`" index="DOCUMENTROOTAUDITINGDTYPE" length="255" not-null="true"/> - </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> </version> @@ -141,7 +138,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="SCHEMAPRIMERPOAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -161,16 +158,16 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="schemaprimerpoAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <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="order" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`ORDER`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="schemaprimerpoAuditing.DocumentRootAuditing_mixed" lazy="false" table="`SCHEMAPRIMERPOAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">schemaprimerpoAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -178,6 +175,12 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <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="`MIXED_COMMENT`"/> + </property> + <property name="order" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_ORDER`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml index b624d9ccd..c941ba178 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_e_o_hibernate.hbm.xml @@ -346,7 +346,7 @@ <column not-null="false" unique="false" name="`BOOKS`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="sunBooksAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_booksAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> @@ -365,7 +365,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="SUNBOOKSAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -385,16 +385,13 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="sunBooksAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="collection" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLLECTION`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="sunBooksAuditing.DocumentRootAuditing_mixed" lazy="false" table="`SUNBOOKSAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">sunBooksAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -402,6 +399,9 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="collection" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_COLLECTION`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml index e46f602fa..2c30e2e1d 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/SunBooksAction_hsqldb_h_o_hibernate.hbm.xml @@ -376,16 +376,13 @@ <column not-null="false" unique="false" name="`BOOKS`"/> </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="DocumentRootAuditing" abstract="false" lazy="false" discriminator-value="DocumentRootAuditing" table="`DOCUMENTROOTAUDITING`"> + <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="sunBooksAuditing.DocumentRootAuditing" abstract="false" lazy="false"> <meta attribute="eclassName" inherit="false">DocumentRootAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/sun_booksAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> <generator class="native"/> </id> - <discriminator type="string"> - <column name="`DTYPE`" index="DOCUMENTROOTAUDITINGDTYPE" length="255" not-null="true"/> - </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> </version> @@ -398,7 +395,7 @@ <property name="teneo_end" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_END`"/> </property> - <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> + <many-to-one name="teneo_commit_info" entity-name="TeneoAuditCommitInfo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="SUNBOOKSAUDITING_DOCUMENTROOTAUDITING_TENEO_COMMIT_INFO" insert="true" update="true" not-null="true"> <column not-null="true" unique="false" name="`TENEOAUDITCOMMITINFO_TENEO_COMMIT_INFO_ID`"/> </many-to-one> <property name="teneo_audit_kind" lazy="false" not-null="true" insert="true" update="true" unique="false"> @@ -418,16 +415,13 @@ <property name="teneo_previous_start" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> <column not-null="false" unique="false" name="`TENEO_PREVIOUS_START`"/> </property> - <list name="mixed" table="`DOCUMENTROOTAUDITING_MIXED`" lazy="true" cascade="all,delete-orphan"> - <key update="true"> - <column name="`DOCUMENTROOTAUDITING_MIXED_TENEO_AUDIT_ID`" unique="false"/> - </key> - <list-index column="`DOCUMENTROOTAUDITING_MIXED_IDX`"/> - <one-to-many entity-name="DocumentRootAuditing_mixed"/> - </list> + <many-to-one name="mixed" entity-name="sunBooksAuditing.DocumentRootAuditing_mixed" cascade="all" not-null="false"/> + <property name="collection" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`COLLECTION`"/> + </property> </class> - <class entity-name="DocumentRootAuditing_mixed" lazy="false" table="`DOCUMENTROOTAUDITING_MIXED`"> - <meta attribute="featureMap" inherit="false">DocumentRootAuditing</meta> + <class entity-name="sunBooksAuditing.DocumentRootAuditing_mixed" lazy="false" table="`SUNBOOKSAUDITING_DOCUMENTROOTAUDITING_MIXED`"> + <meta attribute="featureMap" inherit="false">sunBooksAuditing.DocumentRootAuditing</meta> <id type="long"> <generator class="native"/> </id> @@ -435,6 +429,9 @@ <meta attribute="syntheticVersion" inherit="false">true</meta> </version> <property name="fme_feature" type="java.lang.String"/> + <property name="collection" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`MIXED_COLLECTION`"/> + </property> <property name="fme_mixed_text" type="java.lang.String"/> <property name="fme_mixed_cdata" type="java.lang.String"/> <property name="fme_mixed_comment" type="java.lang.String"/> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/AllTests.java index e17d3c01d..30067da32 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/AllTests.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/AllTests.java @@ -34,8 +34,8 @@ public class AllTests { TestSuite suite = new MultiCfgTestSuite( "Test for org.eclipse.emf.teneo.hibernate.test.emf.auditing", HibernateTestbed.instance() .getConfigurations()); + suite.addTestSuite(EMapAuditingTrueEMapAction.class); suite.addTestSuite(SimpleLibraryAuditingAction.class); - // suite.addTestSuite(EmployeeAuditingAction.class); return suite; } diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/EMapAuditingTrueEMapAction.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/EMapAuditingTrueEMapAction.java new file mode 100755 index 000000000..aa0e19849 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/EMapAuditingTrueEMapAction.java @@ -0,0 +1,251 @@ +/** + * <copyright> + * + * Copyright (c) 2005, 2006, 2007, 2008 Springsite BV (The Netherlands) and others + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Martin Taal + * </copyright> + * + * $Id: EMapAction.java,v 1.2 2010/04/04 12:12:22 mtaal Exp $ + */ + +package org.eclipse.emf.teneo.hibernate.test.emf.auditing; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; + +import org.eclipse.emf.teneo.PersistenceOptions; +import org.eclipse.emf.teneo.hibernate.auditing.AuditVersionProvider; +import org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditEntry; +import org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.TeneoAuditKind; +import org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierCacheHandler; +import org.eclipse.emf.teneo.hibernate.test.stores.HibernateTestStore; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Book; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.EmapFactory; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.EmapPackage; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Writer; +import org.eclipse.emf.teneo.test.AbstractTestAction; +import org.eclipse.emf.teneo.test.stores.TestStore; + +/** + * Tests support for emaps and auditing. + * + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.2 $ + */ +public class EMapAuditingTrueEMapAction extends AbstractTestAction { + + private Date testDate = new Date(); + private Date testDate2 = new Date(System.currentTimeMillis() + 1000); + + /** + * Constructor for ClassHierarchyParsing. + * + * @param arg0 + */ + public EMapAuditingTrueEMapAction() { + super(EmapPackage.eINSTANCE); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.emf.teneo.test.AbstractTestAction#getExtraConfigurationProperties () + */ + @Override + public Properties getExtraConfigurationProperties() { + final Properties props = new Properties(); + props.put(PersistenceOptions.EMAP_AS_TRUE_MAP, "true"); + return props; + } + + /** Creates an item, an address and links them to a po. */ + @Override + public void doAction(TestStore store) { + final String pre1 = "prefix1"; + final String pre2 = "prefix2"; + { + store.beginTransaction(); + store.store(createTestSet(pre1)); + store.store(createTestSet(pre2)); + store.commitTransaction(); + } + + Writer w3 = null; + { + // update some stuff + store.beginTransaction(); + List<Book> lst = store.getObjects(Book.class); + for (Iterator<Book> it = lst.iterator(); it.hasNext();) { + final Book bk = it.next(); + if (bk.getTitle().equals(pre1)) { + bk.setTitle("updated_" + pre1); + bk.getKeyWords().remove(pre1 + "_2"); + bk.getKeyWords().put(pre1 + "abc", "abc"); + bk.getCityByWriter().clear(); + bk.getCategoryByDate().put(testDate, Category.SIMPLE); + bk.getCategoryByDate().put(testDate2, Category.SIMPLE); + } + if (bk.getTitle().equals(pre2)) { + bk.getCategoryByDate().clear(); + for (Writer w : bk.getWriters().values()) { + w.setName("abc" + w.getName()); + } + w3 = EmapFactory.eINSTANCE.createWriter(); + w3.setName(pre2 + "name3"); + store.store(w3); + bk.getCityByWriter().put(w3, w3.getName()); + } + } + store.commitTransaction(); + } + + Object id = null; + final HibernateTestStore testStore = (HibernateTestStore) store; + { + final AuditVersionProvider auditVersionProvider = testStore.getEmfDataStore() + .getAuditVersionProvider(); + + for (Book bk : store.getObjects(Book.class)) { + id = IdentifierCacheHandler.getInstance().getID(bk); + final List<TeneoAuditEntry> auditEntries = auditVersionProvider.getAllAuditEntries(bk); + assertTrue(auditEntries.size() == 2); + assertTrue(auditEntries.get(0).getTeneo_audit_kind() == TeneoAuditKind.ADD); + assertTrue(auditEntries.get(1).getTeneo_audit_kind() == TeneoAuditKind.UPDATE); + final Book bkAdd = (Book) auditVersionProvider.getRevision(auditEntries.get(0)); + final Book bkUpdate = (Book) auditVersionProvider.getRevision(auditEntries.get(1)); + assertTrue(bkAdd != bkUpdate); + + final Collection<Writer> updateWriters = bkUpdate.getWriters().values(); + for (Writer w : bkAdd.getWriters().values()) { + assertFalse(updateWriters.contains(w)); + } + + if (bk.getTitle().equals("updated_" + pre1)) { + assertTrue(bkAdd.getTitle().equals(pre1)); + assertTrue(bkAdd.getKeyWords().size() == 2); + assertTrue(bkAdd.getKeyWords().containsKey(pre1 + "_2")); + assertFalse(bkAdd.getKeyWords().containsKey(pre1 + "abc")); + assertTrue(bkAdd.getCityByWriter().size() == 2); + assertTrue(bkAdd.getCategoryByDate().size() == 1); + assertTrue(bkAdd.getCategoryByDate().containsKey(testDate)); + + assertTrue(bkUpdate.getTitle().equals("updated_" + pre1)); + assertTrue(bkUpdate.getKeyWords().size() == 2); + assertFalse(bkUpdate.getKeyWords().containsKey(pre1 + "_2")); + assertTrue(bkUpdate.getKeyWords().containsKey(pre1 + "abc")); + assertTrue(bkUpdate.getCityByWriter().size() == 0); + assertTrue(bkUpdate.getCategoryByDate().size() == 2); + assertTrue(bkUpdate.getCategoryByDate().containsKey(testDate)); + assertTrue(bkUpdate.getCategoryByDate().containsKey(testDate)); + } else { + // test bk2 + assertTrue(bkAdd.getWriters().size() == 2); + for (Writer w : bkAdd.getWriters().values()) { + // emap entry does not resolve automatically + w = auditVersionProvider.resolve(w); + assertTrue(w.getName().startsWith(pre2)); + } + + List<Writer> writers = new ArrayList<Writer>(); + for (Writer w : bkUpdate.getWriters().values()) { + // emap entry does not resolve automatically + w = auditVersionProvider.resolve(w); + writers.add(w); + assertTrue(w.getName().startsWith("abc")); + } + + assertTrue(bkUpdate.getCityByWriter().keySet().size() == 3); + for (Writer w : bkUpdate.getCityByWriter().keySet()) { + // emap entry does not resolve automatically + w = auditVersionProvider.resolve(w); + // check that the resolve in the previous for-loop + // and this one, give the exact same objects + if (w.getName().startsWith("abc")) { + assertTrue(writers.contains(w)); + } + + assertTrue(w.getName().startsWith("abc") || w.getName().equals(pre2 + "name3")); + if (w.getName().equals(pre2 + "name3")) { + final List<TeneoAuditEntry> wAuditEntries = auditVersionProvider + .getAllAuditEntries(w3); + assertTrue(wAuditEntries.size() == 1); + assertTrue(wAuditEntries.get(0).getTeneo_audit_kind() == TeneoAuditKind.ADD); + } + } + } + } + auditVersionProvider.close(); + } + + { + store.beginTransaction(); + List<Book> lst = store.getObjects(Book.class); + for (Iterator<Book> it = lst.iterator(); it.hasNext();) { + final Book bk = it.next(); + store.deleteObject(bk); + } + store.commitTransaction(); + } + + { + final AuditVersionProvider auditVersionProvider = testStore.getEmfDataStore() + .getAuditVersionProvider(); + store.beginTransaction(); + final List<TeneoAuditEntry> auditEntries = auditVersionProvider.getAllAuditEntries( + EmapPackage.eINSTANCE.getBook(), id); + assertTrue(auditEntries.size() == 3); + TeneoAuditEntry e0 = auditEntries.get(0); + TeneoAuditEntry e1 = auditEntries.get(1); + TeneoAuditEntry e2 = auditEntries.get(2); + assertTrue(e0.getTeneo_audit_kind() == TeneoAuditKind.ADD); + assertTrue(e1.getTeneo_audit_kind() == TeneoAuditKind.UPDATE); + assertTrue(e2.getTeneo_audit_kind() == TeneoAuditKind.DELETE); + + assertTrue(e0.getTeneo_previous_start() == -1); + assertTrue(e1.getTeneo_previous_start() == e0.getTeneo_start()); + assertTrue(e1.getTeneo_start() == (e0.getTeneo_end() + 1)); + assertTrue(e2.getTeneo_previous_start() == e1.getTeneo_start()); + assertTrue(e2.getTeneo_start() == (e1.getTeneo_end() + 1)); + assertTrue(e2.getTeneo_end() == -1); + + assertTrue(e1 == auditVersionProvider.getNextEntry(e0)); + assertTrue(e0 == auditVersionProvider.getPreviousEntry(e1)); + assertTrue(e2 == auditVersionProvider + .getLatestAuditEntry(EmapPackage.eINSTANCE.getBook(), id)); + + store.commitTransaction(); + auditVersionProvider.close(); + } + } + + /** Create test set */ + private Book createTestSet(String prefix) { + final EmapFactory factory = EmapFactory.eINSTANCE; + final Writer w1 = factory.createWriter(); + w1.setName(prefix + "name1"); + final Writer w2 = factory.createWriter(); + w2.setName(prefix + "name2"); + final Book bk = factory.createBook(); + bk.setTitle(prefix); + bk.getWriters().put(w1.getName(), w1); + bk.getWriters().put(w2.getName(), w2); + bk.getKeyWords().put(prefix + "_1", prefix + "_1_value"); + bk.getKeyWords().put(prefix + "_2", prefix + "_2_value"); + bk.getCityByWriter().put(w1, w2.getName()); + bk.getCityByWriter().put(w2, w1.getName()); + bk.getCategoryByDate().put(testDate, Category.COMPLEX); + return bk; + } + +} diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/SimpleLibraryAuditingAction.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/SimpleLibraryAuditingAction.java index 62faaf699..ca268b2c0 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/SimpleLibraryAuditingAction.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/SimpleLibraryAuditingAction.java @@ -51,8 +51,6 @@ public class SimpleLibraryAuditingAction extends AbstractTestAction { /** Creates an item, an address and links them to a po. */ @Override public void doAction(TestStore store) { - final LibraryFactory factory = LibraryFactory.eINSTANCE; - testSimpleChange(store); testContainer(store); } diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java index 6f606da7f..a62200b93 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java @@ -42,6 +42,10 @@ public class AllTests { TestSuite suite = new MultiCfgTestSuite( "Test for org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs", HibernateTestbed .instance().getConfigurations()); + suite.addTestSuite(EMapAction.class); + if (true) { + return suite; + } suite.addTestSuite(DateTimeAction.class); suite.addTestSuite(DateTimeEAVAction.class); suite.addTestSuite(AttributesTest.class); |