diff options
author | Martin Taal | 2012-08-06 23:23:47 +0000 |
---|---|---|
committer | Martin Taal | 2012-08-06 23:23:47 +0000 |
commit | ec673167eb22e3b180323564d819f3b0d66ac991 (patch) | |
tree | ae8ee477f149335b994445aea32465641c4de598 /tests/org.eclipse.emf.teneo.hibernate.test | |
parent | 37afe13fe5b23f83c4ff5172e2053fc61dbb70e2 (diff) | |
download | org.eclipse.emf.teneo-ec673167eb22e3b180323564d819f3b0d66ac991.tar.gz org.eclipse.emf.teneo-ec673167eb22e3b180323564d819f3b0d66ac991.tar.xz org.eclipse.emf.teneo-ec673167eb22e3b180323564d819f3b0d66ac991.zip |
Added testcase for 386607
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test')
6 files changed, 132 insertions, 2 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/build.properties b/tests/org.eclipse.emf.teneo.hibernate.test/build.properties index 95553c0e6..ff6d7b277 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/build.properties +++ b/tests/org.eclipse.emf.teneo.hibernate.test/build.properties @@ -8,7 +8,8 @@ bin.includes = .,\ model/,\ META-INF/,\ plugin.xml,\ - plugin.properties + plugin.properties,\ + src/ jars.compile.order = . source.. = src/ output.. = bin/ diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz386607Action_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz386607Action_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..e3cf53262 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz386607Action_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz386607.impl.BarImpl" entity-name="Bar" abstract="false" lazy="false" table="`BAR`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz386607</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <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="foo" entity-name="Foo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BAR_FOO" insert="true" update="true" not-null="true"> + <column not-null="false" unique="false" name="`FOO_FOO_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz386607.impl.FooImpl" entity-name="Foo" abstract="false" lazy="false" table="`FOO`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz386607</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz386607Action_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz386607Action_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..d54263baf --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz386607Action_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping auto-import="false"> + <class name="org.eclipse.emf.teneo.samples.issues.bz386607.impl.BarImpl" entity-name="Bar" abstract="false" lazy="false" discriminator-value="Bar" table="`BAR`"> + <meta attribute="eclassName" inherit="false">Bar</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz386607</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="BARDTYPE" length="255" not-null="true"/> + </discriminator> + <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="foo" entity-name="Foo" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="BAR_FOO" insert="true" update="true" not-null="true"> + <column not-null="false" unique="false" name="`FOO_FOO_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz386607.impl.FooImpl" entity-name="Foo" abstract="false" lazy="false" discriminator-value="Foo" table="`FOO`"> + <meta attribute="eclassName" inherit="false">Foo</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/issues/bz386607</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <discriminator type="string"> + <column name="`DTYPE`" index="FOODTYPE" length="255" not-null="true"/> + </discriminator> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/AllTests.java index 94ae3a972..406fda0b0 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/AllTests.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/AllTests.java @@ -55,7 +55,7 @@ public class AllTests { TestSuite suite = new MultiCfgTestSuite( "Test for org.eclipse.emf.teneo.hibernate.test.issues", HibernateTestbed.instance().getConfigurations()); - + suite.addTestSuite(Bz386607Action.class); suite.addTestSuite(Bz375705Action.class); suite.addTestSuite(Bz372869Action.class); suite.addTestSuite(Bz363777Action.class); diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/Bz386607Action.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/Bz386607Action.java new file mode 100644 index 000000000..e6ce8dc19 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/Bz386607Action.java @@ -0,0 +1,52 @@ +/** + * <copyright> Copyright (c) 2012 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: + * AgilAction.java,v 1.1 2007/03/28 13:58:33 mtaal Exp $ + */ + +package org.eclipse.emf.teneo.hibernate.test.issues; + +import java.util.Calendar; +import java.util.Properties; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.teneo.PersistenceOptions; +import org.eclipse.emf.teneo.samples.issues.bz242995.Author; +import org.eclipse.emf.teneo.samples.issues.bz242995.Book; +import org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory; +import org.eclipse.emf.teneo.samples.issues.bz242995.Library; +import org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder; +import org.eclipse.emf.teneo.samples.issues.bz242995.Writer; +import org.eclipse.emf.teneo.samples.issues.bz242995.bz242995Factory; +import org.eclipse.emf.teneo.samples.issues.bz242995.bz242995Package; +import org.eclipse.emf.teneo.samples.issues.bz375705.Bar; +import org.eclipse.emf.teneo.samples.issues.bz375705.Bz375705Factory; +import org.eclipse.emf.teneo.samples.issues.bz375705.Bz375705Package; +import org.eclipse.emf.teneo.samples.issues.bz386607.Bz386607Package; +import org.eclipse.emf.teneo.test.AbstractTestAction; +import org.eclipse.emf.teneo.test.stores.TestStore; +import org.hibernate.proxy.HibernateProxy; + +/** + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.1 $ + */ +public class Bz386607Action extends AbstractTestAction { + + public Bz386607Action() { + super(new EPackage[] { Bz386607Package.eINSTANCE }); + } + + @Override + public Properties getExtraConfigurationProperties() { + final Properties props = new Properties(); + props.setProperty(PersistenceOptions.PERSISTENCE_XML, "org/eclipse/emf/teneo/hibernate/test/issues/bz386607.persistence.xml"); + return props; + } + + @Override + public void doAction(TestStore store) { + } +} diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/bz386607.persistence.xml b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/bz386607.persistence.xml new file mode 100755 index 000000000..3381ef94a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/bz386607.persistence.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<persistence-mapping xmlns="http://www.eclipse.org/emft/teneo" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <epackage namespace-uri="http://www.eclipse.org/emf/teneo/samples/issues/bz386607"> + <eclass name="Bar"> + <ereference name="foo"> + <join-column nullable="true" /> + </ereference> + </eclass> + </epackage> +</persistence-mapping>
\ No newline at end of file |