diff options
author | Martin Taal | 2015-01-06 13:14:07 +0000 |
---|---|---|
committer | Martin Taal | 2015-01-06 13:14:07 +0000 |
commit | d28f2a9899cd66df96b2eda70a6d6b439837ee07 (patch) | |
tree | b76c18aeaa20b90cc455af85379d850e0c881bb0 | |
parent | 964fd42cc928577790d350400d98004c1eef27e2 (diff) | |
download | org.eclipse.emf.teneo-d28f2a9899cd66df96b2eda70a6d6b439837ee07.tar.gz org.eclipse.emf.teneo-d28f2a9899cd66df96b2eda70a6d6b439837ee07.tar.xz org.eclipse.emf.teneo-d28f2a9899cd66df96b2eda70a6d6b439837ee07.zip |
Upgrading to HB 4.3.7, solve wrong index issue on EMAP as list extra lazy
6 files changed, 577 insertions, 4 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbConstants.java b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbConstants.java index efc5d3c26..8c64232df 100755 --- a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbConstants.java +++ b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbConstants.java @@ -75,4 +75,6 @@ public class HbConstants { public final static String EAV_COLLECTIONLAZY_REGEX = "\\{collectionLazySetting\\}"; public final static String SYNTHETIC_PROPERTY_INDICATOR = "synthetic-property"; + + public final static String SYNTHETIC_INDEX_PROPERTY_INDICATOR = "synthetic-index-property"; }
\ No newline at end of file diff --git a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbDataStore.java b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbDataStore.java index 5bdd847a3..303d9f2f2 100755 --- a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbDataStore.java +++ b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbDataStore.java @@ -73,6 +73,7 @@ import org.eclipse.emf.teneo.hibernate.mapping.econtainer.EContainerUserType; import org.eclipse.emf.teneo.hibernate.mapping.econtainer.NewEContainerFeatureIDPropertyHandler; import org.eclipse.emf.teneo.hibernate.mapping.elist.HibernateFeatureMapEntry; import org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierCacheHandler; +import org.eclipse.emf.teneo.hibernate.mapping.property.SyntheticIndexPropertyHandler; import org.eclipse.emf.teneo.hibernate.mapping.property.SyntheticPropertyHandler; import org.eclipse.emf.teneo.hibernate.resource.HibernateResource; import org.eclipse.emf.teneo.hibernate.resource.HibernateResourceFactory; @@ -869,12 +870,14 @@ public abstract class HbDataStore implements DataStore, AuditDataStore { indexProperty.setName(StoreUtil.getExtraLazyInverseIndexPropertyName(ef)); final Map<Object, Object> metas = new HashMap<Object, Object>(); final MetaAttribute metaAttribute = new MetaAttribute( - HbConstants.SYNTHETIC_PROPERTY_INDICATOR); + HbConstants.SYNTHETIC_INDEX_PROPERTY_INDICATOR); metaAttribute.addValue("true"); - metas.put(HbConstants.SYNTHETIC_PROPERTY_INDICATOR, metaAttribute); + metas.put(HbConstants.SYNTHETIC_INDEX_PROPERTY_INDICATOR, metaAttribute); + indexProperty.setMetaAttributes(metas); indexProperty.setNodeName(indexProperty.getName()); - indexProperty.setPropertyAccessorName(SyntheticPropertyHandler.class.getName()); + indexProperty.setPropertyAccessorName(SyntheticIndexPropertyHandler.class + .getName()); // always make this nullable, nullability is controlled // by the main property indexProperty.setOptional(true); diff --git a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbUtil.java b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbUtil.java index 1901db5f6..614efcfc8 100755 --- a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbUtil.java +++ b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbUtil.java @@ -42,6 +42,7 @@ import org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHand import org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierUtil; import org.eclipse.emf.teneo.hibernate.mapping.property.EAttributePropertyHandler; import org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler; +import org.eclipse.emf.teneo.hibernate.mapping.property.SyntheticIndexPropertyHandler; import org.eclipse.emf.teneo.hibernate.mapping.property.SyntheticPropertyHandler; import org.eclipse.emf.teneo.util.StoreUtil; import org.hibernate.Session; @@ -240,6 +241,8 @@ public class HbUtil { String entityName, EClass mappedEClass) { if (mappedProperty.getMetaAttribute(HbConstants.SYNTHETIC_PROPERTY_INDICATOR) != null) { // synthetic return new SyntheticPropertyHandler(mappedProperty.getName()); + } else if (mappedProperty.getMetaAttribute(HbConstants.SYNTHETIC_INDEX_PROPERTY_INDICATOR) != null) { // synthetic + return new SyntheticIndexPropertyHandler(mappedProperty.getName()); } else if (mappedProperty.getMetaAttribute(HbMapperConstants.ID_META) != null) { // synthetic // ID return new IdentifierPropertyHandler(); diff --git a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/property/SyntheticIndexPropertyHandler.java b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/property/SyntheticIndexPropertyHandler.java new file mode 100644 index 000000000..4514bd927 --- /dev/null +++ b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/property/SyntheticIndexPropertyHandler.java @@ -0,0 +1,50 @@ +/** + * <copyright> + * + * Copyright (c) 2015 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: SyntheticPropertyHandler.java,v 1.5 2010/11/11 10:28:19 mtaal Exp $ + */ + +package org.eclipse.emf.teneo.hibernate.mapping.property; + +import java.util.Map; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; + +/** + * See {@link SyntheticIndexPropertyHandler}, extends but prevents returning a value in case of + * first insert. This because hibernate will do this explicitly later. + * + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.5 $ + */ +@SuppressWarnings("serial") +public class SyntheticIndexPropertyHandler extends SyntheticPropertyHandler { + + /** Constructor */ + public SyntheticIndexPropertyHandler(String propertyName) { + super(propertyName); + } + + /* + * (non-Javadoc) + * + * @see org.hibernate.property.Getter#getForInsert(java.lang.Object, java.util.Map, + * org.hibernate.engine.SessionImplementor) + */ + @SuppressWarnings("rawtypes") + public Object getForInsert(Object arg0, Map arg1, SessionImplementor arg2) + throws HibernateException { + return null; + } +}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_mysql_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..85ac757e7 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs/EMapAsListExtraLazyAction_mysql_e_o_hibernate.hbm.xml @@ -0,0 +1,515 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <typedef name="emap.CategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</param> + <param name="edatatype">CategoryObject</param> + </typedef> + <class name="org.eclipse.emf.teneo.samples.emf.schemaconstructs.emap.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`book`"> + <meta attribute="eclassName" inherit="false">Book</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/emap</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="title" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> + <column not-null="true" unique="false" name="`title`"/> + </property> + <list name="writers" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="book_writers_key" update="true"> + <column name="`book_writers_e_id`" unique="false"/> + </key> + <list-index column="`book_writers_idx`"/> + <one-to-many entity-name="StringToWriterMapEntry"/> + </list> + <list name="keyWords" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="book_keywords_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" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="book_citybywriter_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" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="book_categorybydate_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> + </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="java.lang.String"> + <column not-null="false" unique="false" name="`comment`" length="2000"/> + </property> + <property name="commitTime" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`committime`"/> + </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`" unique-key="c0,c1,c2"/> + </property> + <property name="teneo_owner_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_owner_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`" unique-key="c0"/> + </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`" unique-key="c1"/> + </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`" unique-key="c2"/> + </property> + <property name="teneo_object_version" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`teneo_object_version`"/> + </property> + <property name="teneo_resourceid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`teneo_resourceid`"/> + </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" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="bookauditing_writers_key" update="true"> + <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" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="bookauditing_keywords_key" update="true"> + <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" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="bookauditing_citybywriter_key" update="true"> + <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" inverse="true" lazy="extra" cascade="all,delete-orphan"> + <key foreign-key="bookauditing_categorybydate_key" update="true"> + <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`" unique-key="c0,c1,c2"/> + </property> + <property name="teneo_owner_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_owner_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`" unique-key="c0"/> + </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`" unique-key="c1"/> + </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`" unique-key="c2"/> + </property> + <property name="teneo_object_version" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`teneo_object_version`"/> + </property> + <property name="teneo_resourceid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`teneo_resourceid`"/> + </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`" unique-key="c0,c1,c2"/> + </property> + <property name="teneo_owner_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_owner_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`" unique-key="c0"/> + </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`" unique-key="c1"/> + </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`" unique-key="c2"/> + </property> + <property name="teneo_object_version" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`teneo_object_version`"/> + </property> + <property name="teneo_resourceid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`teneo_resourceid`"/> + </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`" unique-key="c0,c1,c2"/> + </property> + <property name="teneo_owner_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_owner_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`" unique-key="c0"/> + </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`" unique-key="c1"/> + </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`" unique-key="c2"/> + </property> + <property name="teneo_object_version" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`teneo_object_version`"/> + </property> + <property name="teneo_resourceid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`teneo_resourceid`"/> + </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`" unique-key="c0,c1,c2"/> + </property> + <property name="teneo_owner_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_owner_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`" unique-key="c0"/> + </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`" unique-key="c1"/> + </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`" unique-key="c2"/> + </property> + <property name="teneo_object_version" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`teneo_object_version`"/> + </property> + <property name="teneo_resourceid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`teneo_resourceid`"/> + </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`" unique-key="c0,c1,c2"/> + </property> + <property name="teneo_owner_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_owner_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`" unique-key="c0"/> + </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`" unique-key="c1"/> + </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`" unique-key="c2"/> + </property> + <property name="teneo_object_version" lazy="false" insert="true" update="true" not-null="false" unique="false" type="long"> + <column not-null="false" unique="false" name="`teneo_object_version`"/> + </property> + <property name="teneo_resourceid" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`teneo_resourceid`"/> + </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/src/dbadapters.properties b/tests/org.eclipse.emf.teneo.hibernate.test/src/dbadapters.properties index 8297501b7..672e3a33e 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/dbadapters.properties +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/dbadapters.properties @@ -27,7 +27,7 @@ mysql.dburl=jdbc:mysql://127.0.0.1:3306/ mysql.dbuser=root -mysql.dbpassword=root +mysql.dbpassword= mysql.dbdriver=com.mysql.jdbc.Driver mysql.dbadapter=org.eclipse.emf.teneo.hibernate.test.stores.adapters.HibernateMysqlDBAdapter |