diff options
author | Martin Taal | 2012-05-14 09:04:09 +0000 |
---|---|---|
committer | Martin Taal | 2012-05-14 09:04:09 +0000 |
commit | 3382f6c56427b3461d9ba2612a532379ea61bfbc (patch) | |
tree | 9a32dceb55720f5f25090aa2281a4a487509d718 /tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2 | |
parent | 73283623093d6cb931003b31fb5d3d49eed73ab4 (diff) | |
download | org.eclipse.emf.teneo-3382f6c56427b3461d9ba2612a532379ea61bfbc.tar.gz org.eclipse.emf.teneo-3382f6c56427b3461d9ba2612a532379ea61bfbc.tar.xz org.eclipse.emf.teneo-3382f6c56427b3461d9ba2612a532379ea61bfbc.zip |
Added collection table testcase
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2')
2 files changed, 104 insertions, 0 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2/CollectionTableAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2/CollectionTableAction_hsqldb_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..c8d22ef6a --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2/CollectionTableAction_hsqldb_e_o_hibernate.hbm.xml @@ -0,0 +1,49 @@ +<?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.emf.jpa2.collectiontable.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/jpa2/collectiontable</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> + <list name="names" table="`NAMESTABLE`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`JOINCOLUMN1`" unique="false"/> + <column name="`JOINCOLUMN1`" unique="false"/> + </key> + <list-index column="`ITEM_NAMES_IDX`"/> + <element type="java.lang.String"/> + </list> + <list name="items" table="`EMBEDDEDITEMSTABLE`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`MYJC`" unique="false"/> + </key> + <list-index column="`ITEM_ITEMS_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.samples.emf.jpa2.collectiontable.impl.EmbeddedItemImpl"> + <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> + </composite-element> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.jpa2.collectiontable.impl.EmbeddedItemImpl" entity-name="EmbeddedItem" abstract="false" lazy="false" table="`EMBEDDEDITEM`"> + <meta attribute="eclassName" inherit="false">EmbeddedItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/jpa2/collectiontable</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> +</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.jpa2/CollectionTableAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2/CollectionTableAction_hsqldb_h_o_hibernate.hbm.xml new file mode 100644 index 000000000..557ff9c7f --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.jpa2/CollectionTableAction_hsqldb_h_o_hibernate.hbm.xml @@ -0,0 +1,55 @@ +<?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.emf.jpa2.collectiontable.impl.ItemImpl" entity-name="Item" abstract="false" lazy="false" discriminator-value="Item" table="`ITEM`"> + <meta attribute="eclassName" inherit="false">Item</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/jpa2/collectiontable</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="ITEMDTYPE" 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> + <list name="names" table="`NAMESTABLE`" lazy="true" cascade="all,delete-orphan"> + <key update="true"> + <column name="`JOINCOLUMN1`" unique="false"/> + <column name="`JOINCOLUMN1`" unique="false"/> + </key> + <list-index column="`ITEM_NAMES_IDX`"/> + <element type="java.lang.String"/> + </list> + <list name="items" table="`EMBEDDEDITEMSTABLE`" lazy="true" cascade="persist,merge,refresh,save-update,lock"> + <key update="true"> + <column name="`MYJC`" unique="false"/> + </key> + <list-index column="`ITEM_ITEMS_IDX`"/> + <composite-element class="org.eclipse.emf.teneo.samples.emf.jpa2.collectiontable.impl.EmbeddedItemImpl"> + <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> + </composite-element> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.jpa2.collectiontable.impl.EmbeddedItemImpl" entity-name="EmbeddedItem" abstract="false" lazy="false" discriminator-value="EmbeddedItem" table="`EMBEDDEDITEM`"> + <meta attribute="eclassName" inherit="false">EmbeddedItem</meta> + <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/jpa2/collectiontable</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="EMBEDDEDITEMDTYPE" 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> +</hibernate-mapping>
\ No newline at end of file |