diff options
author | Martin Taal | 2012-10-12 11:21:10 +0000 |
---|---|---|
committer | Martin Taal | 2012-10-12 11:21:10 +0000 |
commit | 09e9d9bb4383dfb8ccb93ba9b1b8563cd3f8a1c4 (patch) | |
tree | 4a1e3ae24d10954ed3292ae275db8cd11791c2d9 /tests/org.eclipse.emf.teneo.hibernate.test/hbm | |
parent | 8a3198e40ff2b1011bb0e74fc89ea04b9271a5ef (diff) | |
download | org.eclipse.emf.teneo-09e9d9bb4383dfb8ccb93ba9b1b8563cd3f8a1c4.tar.gz org.eclipse.emf.teneo-09e9d9bb4383dfb8ccb93ba9b1b8563cd3f8a1c4.tar.xz org.eclipse.emf.teneo-09e9d9bb4383dfb8ccb93ba9b1b8563cd3f8a1c4.zip |
Added testcase for non-mandatory join column
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/hbm')
2 files changed, 72 insertions, 0 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NonMandatoryJoinColumnAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NonMandatoryJoinColumnAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..d52c631d6 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NonMandatoryJoinColumnAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,33 @@ +<?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.nonmandatoryjoincolumn.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/nonmandatoryjoincolumn</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="bar" entity-name="Bar" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FOO_BAR" insert="true" update="true" not-null="true"> + <column not-null="false" unique="false" name="`BAR_BAR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nonmandatoryjoincolumn.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/nonmandatoryjoincolumn</meta> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId" inherit="false">true</meta> + <generator class="native"/> + </id> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion" inherit="false">true</meta> + </version> + <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`NAME`"/> + </property> + </class> +</hibernate-mapping>
\ No newline at end of file diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NonMandatoryJoinColumnAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NonMandatoryJoinColumnAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..881d095b1 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/NonMandatoryJoinColumnAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,39 @@ +<?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.nonmandatoryjoincolumn.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/nonmandatoryjoincolumn</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> + <many-to-one name="bar" entity-name="Bar" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="FOO_BAR" insert="true" update="true" not-null="true"> + <column not-null="false" unique="false" name="`BAR_BAR_E_ID`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.nonmandatoryjoincolumn.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/nonmandatoryjoincolumn</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> + <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 |