diff options
author | mtaal | 2007-07-18 20:14:43 +0000 |
---|---|---|
committer | mtaal | 2007-07-18 20:14:43 +0000 |
commit | 05d7164f973b6ae436c00bbd8845c44e62542318 (patch) | |
tree | ef819bd46b54fba1391bb83556d78f5ef3e2c965 | |
parent | 35801ba3ec220de26068c0ab3b6f04b4c6c603ac (diff) | |
download | org.eclipse.emf.teneo-05d7164f973b6ae436c00bbd8845c44e62542318.tar.gz org.eclipse.emf.teneo-05d7164f973b6ae436c00bbd8845c44e62542318.tar.xz org.eclipse.emf.teneo-05d7164f973b6ae436c00bbd8845c44e62542318.zip |
Changed location of test.hbm.xml
3 files changed, 101 insertions, 5 deletions
diff --git a/tests/org.eclipse.emf.teneo.commontest/build.properties b/tests/org.eclipse.emf.teneo.commontest/build.properties index 73e465703..93844bc6f 100644 --- a/tests/org.eclipse.emf.teneo.commontest/build.properties +++ b/tests/org.eclipse.emf.teneo.commontest/build.properties @@ -26,10 +26,12 @@ bin.includes = plugin.properties,\ lib/mysql-connector-java-3.1.12-bin.jar,\ src/org/eclipse/emf/teneo/test/emf/sample/library.ecore,\ src/org/eclipse/emf/teneo/test/emf/sample/default.mmd,\ - src/org/eclipse/emf/teneo/test/emf/sample/default.mindmap + src/org/eclipse/emf/teneo/test/emf/sample/default.mindmap,\ + src/org/eclipse/emf/teneo/test/emf/test.hbm.xml src.includes = about.html,\ epl-v10.html,\ - copyright.txt + copyright.txt,\ + src/org/eclipse/emf/teneo/test/emf/test.hbm.xml jars.extra.classpath = lib/tools.jar,\ lib/jtds-1.2.jar,\ lib/mysql-connector-java-3.1.12-bin.jar,\ diff --git a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryUseMappingFileAction.java b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryUseMappingFileAction.java index 7d6834089..c63c13649 100644 --- a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryUseMappingFileAction.java +++ b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryUseMappingFileAction.java @@ -11,7 +11,7 @@ * Martin Taal * </copyright> * - * $Id: LibraryUseMappingFileAction.java,v 1.1 2007/07/17 12:22:44 mtaal Exp $ + * $Id: LibraryUseMappingFileAction.java,v 1.2 2007/07/18 20:14:43 mtaal Exp $ */ package org.eclipse.emf.teneo.test.emf.sample; @@ -34,7 +34,7 @@ import org.eclipse.emf.teneo.test.stores.TestStore; /** * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ public class LibraryUseMappingFileAction extends AbstractTestAction { /** @@ -49,7 +49,7 @@ public class LibraryUseMappingFileAction extends AbstractTestAction { @Override public Properties getExtraConfigurationProperties() { final Properties props = new Properties(); - props.setProperty(PersistenceOptions.MAPPING_FILE_PATH, "/org/eclipse/emf/teneo/test.hbm.xml"); + props.setProperty(PersistenceOptions.MAPPING_FILE_PATH, "/org/eclipse/emf/teneo/test/emf/test.hbm.xml"); return props; } diff --git a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/test.hbm.xml b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/test.hbm.xml new file mode 100644 index 000000000..417c09be8 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/test.hbm.xml @@ -0,0 +1,94 @@ +<?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"> + +<!-- Generated by Teneo on Wed Jul 11 15:23:52 CEST 2007 --> +<hibernate-mapping auto-import="false"> + <typedef name="library.BookCategoryObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType"> + <param name="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</param> + <param name="edatatype">BookCategoryObject</param> + </typedef> + <class entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`testBook`"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId">true</meta> + <generator class="native"/> + </id> + <discriminator column="`dtype`" type="string"/> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion">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> + <property name="pages" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int"> + <column not-null="false" unique="false" name="`pages`"/> + </property> + <property name="category" lazy="false" not-null="false" insert="true" update="true" unique="false"> + <column not-null="false" unique="false" name="`category`"/> + <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserIntegerType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.emf.sample.library.BookCategory</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" cascade="merge,persist,save-update,lock,refresh" lazy="false" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`book_author_e_id`"/> + </many-to-one> + </class> + <class entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`library`"> + <meta attribute="eclassName">Library</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId">true</meta> + <generator class="native"/> + </id> + <discriminator column="`dtype`" type="string"/> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion">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> + <list name="writers" fetch="subselect" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true"> + <column name="`library_writers_e_id`" not-null="false" unique="false"/> + </key> + <list-index column="`library_writers_idx`"/> + <one-to-many entity-name="Writer"/> + </list> + <list name="books" lazy="true" cascade="all,delete-orphan"> + <cache usage="read-write"/> + <key update="true"> + <column name="`library_books_e_id`" not-null="false" unique="false"/> + </key> + <list-index column="`library_books_idx`"/> + <one-to-many entity-name="Book"/> + </list> + </class> + <class entity-name="Writer" abstract="false" lazy="false" discriminator-value="Writer" table="`writer`"> + <meta attribute="eclassName">Writer</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <cache usage="read-write"/> + <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler"> + <meta attribute="syntheticId">true</meta> + <generator class="native"/> + </id> + <discriminator column="`dtype`" type="string"/> + <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler"> + <meta attribute="syntheticVersion">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> + <list name="books" lazy="true" cascade="merge,persist,save-update,lock,refresh"> + <cache usage="read-write"/> + <key update="true"> + <column name="`book_author_e_id`" not-null="false" unique="false"/> + </key> + <list-index column="`writer_books_idx`"/> + <one-to-many entity-name="Book"/> + </list> + </class> +</hibernate-mapping>
\ No newline at end of file |