diff options
author | Martin Taal | 2012-11-02 16:12:49 +0000 |
---|---|---|
committer | Martin Taal | 2012-11-02 16:12:49 +0000 |
commit | b8a50344b372a4016afbef528b546dabee28c268 (patch) | |
tree | b60d75226e4018596bc115e13b3e18b392a6d2b5 /tests/org.eclipse.emf.teneo.hibernate.test | |
parent | 02435788f35b7b1d2a1dd742f7e78b4588ec562e (diff) | |
download | org.eclipse.emf.teneo-b8a50344b372a4016afbef528b546dabee28c268.tar.gz org.eclipse.emf.teneo-b8a50344b372a4016afbef528b546dabee28c268.tar.xz org.eclipse.emf.teneo-b8a50344b372a4016afbef528b546dabee28c268.zip |
added auditing support for emap
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test')
14 files changed, 1130 insertions, 284 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingNoTrueEMapAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingNoTrueEMapAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..f25261344 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingNoTrueEMapAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,458 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <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/EMapAuditingNoTrueEMapAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingNoTrueEMapAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..85c8d5d32 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.auditing/EMapAuditingNoTrueEMapAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,497 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`BOOK`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BOOKDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`TITLE`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_WRITERS"> + <column name="`BOOK_WRITERS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_KEYWORDS"> + <column name="`BOOK_KEYWORDS_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_KEYWORDS_IDX`"/> + <one-to-many entity-name="StringToStringMapEntry"/> + </list> + <list name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CITYBYWRITER"> + <column name="`BOOK_CITYBYWRITER_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToStringMapEntry"/> + </list> + <list name="categoryByDate" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="BOOK_CATEGORYBYDATE"> + <column name="`BOOK_CATEGORYBYDATE_E_ID`" unique="false"/> + </key> + <list-index column="`BOOK_CATEGORYBYDATE_IDX`"/> + <one-to-many entity-name="DateToCategoryMapEntry"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.DateToCategoryMapEntryImpl" entity-name="DateToCategoryMapEntry" abstract="false" lazy="false" discriminator-value="DateToCategoryMapEntry" table="`DATETOCATEGORYMAPENTRY`"> + <meta attribute="eclassName" inherit="false">DateToCategoryMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="DATETOCATEGORYMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="timestamp"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`VALUE`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.Category</param> + <param name="eclassifier">Category</param> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + </type> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToStringMapEntryImpl" entity-name="StringToStringMapEntry" abstract="false" lazy="false" discriminator-value="StringToStringMapEntry" table="`STRINGTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.StringToWriterMapEntryImpl" entity-name="StringToWriterMapEntry" abstract="false" lazy="false" discriminator-value="StringToWriterMapEntry" table="`STRINGTOWRITERMAPENTRY`"> + <meta attribute="eclassName" inherit="false">StringToWriterMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="STRINGTOWRITERMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="key" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> + </property> + <many-to-one name="value" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="STRINGTOWRITERMAPENTRY_VALUE" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_VALUE_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`WRITER`"> + <meta attribute="eclassName" inherit="false">Writer</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`NAME`"/> + </property> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.WriterToStringMapEntryImpl" entity-name="WriterToStringMapEntry" abstract="false" lazy="false" discriminator-value="WriterToStringMapEntry" table="`WRITERTOSTRINGMAPENTRY`"> + <meta attribute="eclassName" inherit="false">WriterToStringMapEntry</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="WRITERTOSTRINGMAPENTRYDTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <many-to-one name="key" entity-name="Writer" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="WRITERTOSTRINGMAPENTRY_KEY" insert="true" update="true" not-null="false"> + <column not-null="false" unique="false" name="`WRITER_KEY_E_ID`"/> + </many-to-one> + <property name="value" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`VALUE`"/> + </property> + </class> + <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 f25261344..916bb6cd9 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,90 +19,40 @@ <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`TITLE`"/> </property> - <list name="writers" lazy="true" cascade="all,delete-orphan"> + <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> - <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"> + <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> - <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"> + <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> - <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"> + <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> - <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> + <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> @@ -118,23 +68,6 @@ <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> 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 85c8d5d32..ccb1fe348 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,99 +22,40 @@ <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`TITLE`"/> </property> - <list name="writers" lazy="true" cascade="all,delete-orphan"> + <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> - <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"> + <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> - <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"> + <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> - <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"> + <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> - <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> + <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> @@ -133,26 +74,6 @@ <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> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml index f334c9544..ee85ee762 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_e_o_hibernate.hbm.xml @@ -124,23 +124,23 @@ <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="writersByName" lazy="true" cascade="all,delete-orphan"> + <list name="writersByName" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="BOOKAUDITING_WRITERSBYNAME"> <column name="`BOOKAUDITING_WRITERSBYNAME_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <one-to-many entity-name="Writer"/> - </map> - <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <list-index column="`BOOKAUDITING_WRITERSBYNAME_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </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"/> - <one-to-many entity-name="City"/> - </map> + <list-index column="`BOOKAUDITING_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToCityMapEntryAuditing"/> + </list> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="CityAuditing" abstract="false" lazy="false" table="`CITYAUDITING`"> - <meta attribute="eclassName" inherit="false">CityAuditing</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/annotations/hbmapkeysAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -158,7 +158,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="CITYAUDITING_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"> @@ -178,15 +178,15 @@ <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="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> </property> - <property name="cityWriter" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`CITYWRITER`"/> + <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="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="WriterToCityMapEntryAuditing" abstract="false" lazy="false" table="`WRITERTOCITYMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterToCityMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeysAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -204,7 +204,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="WRITERTOCITYMAPENTRYAUDITING_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"> @@ -231,8 +231,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="CityAuditing" abstract="false" lazy="false" table="`CITYAUDITING`"> + <meta attribute="eclassName" inherit="false">CityAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeysAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -250,7 +250,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="CITYAUDITING_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"> @@ -273,9 +273,12 @@ <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`NAME`"/> </property> + <property name="cityWriter" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CITYWRITER`"/> + </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToCityMapEntryAuditing" abstract="false" lazy="false" table="`WRITERTOCITYMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">WriterToCityMapEntryAuditing</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/annotations/hbmapkeysAuditing</meta> <id name="teneo_audit_id" type="long" unsaved-value="0"> <column not-null="true" unique="false" name="`TENEO_AUDIT_ID`"/> @@ -293,7 +296,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="WRITERTOCITYMAPENTRYAUDITING_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"> @@ -313,11 +316,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.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml index b6b2f000f..38e12ad64 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/HbMapKeysAction_hsqldb_h_o_hibernate.hbm.xml @@ -139,30 +139,30 @@ <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="writersByName" lazy="true" cascade="all,delete-orphan"> + <list name="writersByName" lazy="true" cascade="all,delete-orphan"> <key update="true" foreign-key="BOOKAUDITING_WRITERSBYNAME"> <column name="`BOOKAUDITING_WRITERSBYNAME_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <one-to-many entity-name="Writer"/> - </map> - <map name="cityByWriter" lazy="true" cascade="all,delete-orphan"> + <list-index column="`BOOKAUDITING_WRITERSBYNAME_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </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"/> - <one-to-many entity-name="City"/> - </map> + <list-index column="`BOOKAUDITING_CITYBYWRITER_IDX`"/> + <one-to-many entity-name="WriterToCityMapEntryAuditing"/> + </list> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="CityAuditing" abstract="false" lazy="false" discriminator-value="CityAuditing" table="`CITYAUDITING`"> - <meta attribute="eclassName" inherit="false">CityAuditing</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/annotations/hbmapkeysAuditing</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="CITYAUDITINGDTYPE" 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`"/> @@ -176,7 +176,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="CITYAUDITING_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"> @@ -196,22 +196,22 @@ <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="java.lang.String"> + <column not-null="false" unique="false" name="`KEY`"/> </property> - <property name="cityWriter" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> - <column not-null="false" unique="false" name="`CITYWRITER`"/> + <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="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="WriterToCityMapEntryAuditing" abstract="false" lazy="false" discriminator-value="WriterToCityMapEntryAuditing" table="`WRITERTOCITYMAPENTRYAUDITING`"> + <meta attribute="eclassName" inherit="false">WriterToCityMapEntryAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeysAuditing</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="WRITERTOCITYMAPENTRYAUDITINGDTYPE" length="255" not-null="true"/> </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> @@ -225,7 +225,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="WRITERTOCITYMAPENTRYAUDITING_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"> @@ -252,15 +252,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="CityAuditing" abstract="false" lazy="false" discriminator-value="CityAuditing" table="`CITYAUDITING`"> + <meta attribute="eclassName" inherit="false">CityAuditing</meta> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/annotations/hbmapkeysAuditing</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="CITYAUDITINGDTYPE" length="255" not-null="true"/> </discriminator> <version name="teneo_version" type="long"> <column not-null="true" unique="false" name="`TENEO_VERSION`"/> @@ -274,7 +274,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="CITYAUDITING_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"> @@ -297,16 +297,19 @@ <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> <column not-null="false" unique="false" name="`NAME`"/> </property> + <property name="cityWriter" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`CITYWRITER`"/> + </property> </class> - <class name="org.eclipse.emf.teneo.hibernate.auditing.model.teneoauditing.impl.TeneoAuditEntryImpl" entity-name="WriterToCityMapEntryAuditing" abstract="false" lazy="false" discriminator-value="WriterToCityMapEntryAuditing" table="`WRITERTOCITYMAPENTRYAUDITING`"> - <meta attribute="eclassName" inherit="false">WriterToCityMapEntryAuditing</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/annotations/hbmapkeysAuditing</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="WRITERTOCITYMAPENTRYAUDITINGDTYPE" 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`"/> @@ -320,7 +323,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="WRITERTOCITYMAPENTRYAUDITING_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"> @@ -340,11 +343,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.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml index 350336f72..2b3552afa 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_e_o_hibernate.hbm.xml @@ -96,13 +96,13 @@ <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> + <list-index column="`BOOKAUDITING_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </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> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml index 98760b6a2..3c67d175e 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/MapKeyAction_hsqldb_h_o_hibernate.hbm.xml @@ -108,13 +108,13 @@ <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> + <list-index column="`BOOKAUDITING_WRITERS_IDX`"/> + <one-to-many entity-name="StringToWriterMapEntryAuditing"/> + </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> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml index 9fb910d96..24f6f4a5d 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml @@ -81,15 +81,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> - <map name="testMap" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list name="testMap" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TESTELEMENTAUDITING_TESTMAP"> <column name="`TESTELEMENTAUDITING_TESTMAP_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <element not-null="false" unique="false" type="text"> - <column not-null="false" unique="false" name="`VALUE`" length="1000000"/> - </element> - </map> + <list-index column="`TESTELEMENTAUDITING_TESTMAP_IDX`"/> + <one-to-many entity-name="StringToStringMapAuditing"/> + </list> <property name="testProp" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> <column not-null="false" unique="false" name="`TESTPROP`" length="1000000"/> </property> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml index d364343dc..0a1d98a8b 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml @@ -90,15 +90,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> - <map name="testMap" lazy="true" cascade="all,delete-orphan"> - <key update="true"> + <list name="testMap" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="TESTELEMENTAUDITING_TESTMAP"> <column name="`TESTELEMENTAUDITING_TESTMAP_TENEO_AUDIT_ID`" unique="false"/> </key> - <map-key type="java.lang.String"/> - <element not-null="false" unique="false" type="text"> - <column not-null="false" unique="false" name="`VALUE`" length="1000000"/> - </element> - </map> + <list-index column="`TESTELEMENTAUDITING_TESTMAP_IDX`"/> + <one-to-many entity-name="StringToStringMapAuditing"/> + </list> <property name="testProp" lazy="false" insert="true" update="true" not-null="false" unique="false" type="text"> <column not-null="false" unique="false" name="`TESTPROP`" length="1000000"/> </property> 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 30067da32..afe261967 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 @@ -35,6 +35,7 @@ public class AllTests { "Test for org.eclipse.emf.teneo.hibernate.test.emf.auditing", HibernateTestbed.instance() .getConfigurations()); suite.addTestSuite(EMapAuditingTrueEMapAction.class); + suite.addTestSuite(EMapAuditingNoTrueEMapAction.class); suite.addTestSuite(SimpleLibraryAuditingAction.class); return suite; } diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/EMapAuditingNoTrueEMapAction.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/EMapAuditingNoTrueEMapAction.java new file mode 100644 index 000000000..29df6d6c7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/auditing/EMapAuditingNoTrueEMapAction.java @@ -0,0 +1,42 @@ +/** + * <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.Properties; + +import org.eclipse.emf.teneo.PersistenceOptions; + +/** + * Tests support for emaps and auditing. + * + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.2 $ + */ +public class EMapAuditingNoTrueEMapAction extends EMapAuditingTrueEMapAction { + + /* + * (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, "false"); + return props; + } +} 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 index aa0e19849..0aaa47bfa 100755 --- 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 @@ -156,6 +156,8 @@ public class EMapAuditingTrueEMapAction extends AbstractTestAction { w = auditVersionProvider.resolve(w); assertTrue(w.getName().startsWith(pre2)); } + assertTrue(bkAdd.getCategoryByDate().size() == 1); + assertTrue(bkUpdate.getCategoryByDate().size() == 0); List<Writer> writers = new ArrayList<Writer>(); for (Writer w : bkUpdate.getWriters().values()) { 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 a62200b93..6f606da7f 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,10 +42,6 @@ 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); |