diff options
author | mtaal | 2009-03-15 08:10:19 +0000 |
---|---|---|
committer | mtaal | 2009-03-15 08:10:19 +0000 |
commit | 211a06dc56a3aa04f7fc6cf228e088d8331310e2 (patch) | |
tree | 1a65750700fcab2e4ae6de938f0b69cb0ede8c6d /tests | |
parent | 5d92937bfe4788ddd3c15ecbe0debfa866c1aef7 (diff) | |
download | org.eclipse.emf.teneo-211a06dc56a3aa04f7fc6cf228e088d8331310e2.tar.gz org.eclipse.emf.teneo-211a06dc56a3aa04f7fc6cf228e088d8331310e2.tar.xz org.eclipse.emf.teneo-211a06dc56a3aa04f7fc6cf228e088d8331310e2.zip |
[268074]
Diffstat (limited to 'tests')
6 files changed, 266 insertions, 11 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_a_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_a_o_hibernate.hbm.xml new file mode 100644 index 000000000..3193e8705 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_a_o_hibernate.hbm.xml @@ -0,0 +1,87 @@ +<?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="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 name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" discriminator-value="Book" table="`book`"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`pages`"/> + </property> + <property name="category" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" 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" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="book_author" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`book_author_e_id`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" 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> + <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"> + <key update="true" foreign-key="schrijvers"> + <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"> + <key update="true" foreign-key="library_books"> + <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 name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" 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> + <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"> + <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 diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..14e1c4274 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_e_o_hibernate.hbm.xml @@ -0,0 +1,84 @@ +<?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="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 name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`book`"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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> + <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="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`pages`"/> + </property> + <property name="category" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" 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" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="book_author" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`book_author_e_id`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`library`"> + <meta attribute="eclassName">Library</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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> + <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"> + <key update="true" foreign-key="schrijvers"> + <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"> + <key update="true" foreign-key="library_books"> + <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 name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`writer`"> + <meta attribute="eclassName">Writer</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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> + <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"> + <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 diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_s_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_s_o_hibernate.hbm.xml new file mode 100644 index 000000000..14e1c4274 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.sample/LibraryNotifyingTestAction_mysql_s_o_hibernate.hbm.xml @@ -0,0 +1,84 @@ +<?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="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 name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.BookImpl" entity-name="Book" abstract="false" lazy="false" table="`book`"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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> + <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="true" unique="false" type="int"> + <column not-null="true" unique="false" name="`pages`"/> + </property> + <property name="category" lazy="false" not-null="true" insert="true" update="true" unique="false"> + <column not-null="true" 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" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="book_author" insert="false" update="false" not-null="false"> + <column not-null="false" unique="false" name="`book_author_e_id`"/> + </many-to-one> + </class> + <class name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`library`"> + <meta attribute="eclassName">Library</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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> + <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"> + <key update="true" foreign-key="schrijvers"> + <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"> + <key update="true" foreign-key="library_books"> + <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 name="org.eclipse.emf.teneo.samples.emf.sample.library.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="false" table="`writer`"> + <meta attribute="eclassName">Writer</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/emf/sample/Library</meta> + <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> + <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"> + <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 diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java index 0b14ee536..2f44ae27b 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java @@ -55,7 +55,7 @@ import org.eclipse.emf.teneo.test.emf.annotations.VariousAction; * All tests * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.77 $ + * @version $Revision: 1.78 $ */ public class AllTests { @@ -64,6 +64,8 @@ public class AllTests { "Test for org.eclipse.emf.teneo.hibernate.test.emf.annotations", HibernateTestbed.instance().getConfigurations()); + suite.addTestSuite(MapKeyAction.class); + suite.addTestSuite(UniqueConstraintsAction.class); suite.addTestSuite(SetAction.class); suite.addTestSuite(HbIdAction.class); suite.addTestSuite(ExternalAction.class); @@ -114,14 +116,10 @@ public class AllTests { suite.addTestSuite(AttributeOverridesAction.class); - suite.addTestSuite(MapKeyAction.class); - suite.addTestSuite(SetNMAction.class); suite.addTestSuite(DuplicatesAction.class); - suite.addTestSuite(UniqueConstraintsAction.class); - suite.addTestSuite(BookAction.class); suite.addTestSuite(EDataTypeAction.class); diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AllTests.java index ebf2be31d..f22ae8abe 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AllTests.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AllTests.java @@ -27,6 +27,7 @@ import org.eclipse.emf.teneo.test.emf.sample.LibraryGlobalEagerAction; import org.eclipse.emf.teneo.test.emf.sample.LibraryJoinTableNamingAction; import org.eclipse.emf.teneo.test.emf.sample.LibraryListAsBagAction; import org.eclipse.emf.teneo.test.emf.sample.LibraryNonResolvingAction; +import org.eclipse.emf.teneo.test.emf.sample.LibraryNotifyingTestAction; import org.eclipse.emf.teneo.test.emf.sample.LibraryQualifyActionHB; import org.eclipse.emf.teneo.test.emf.sample.LibraryResourceAction; import org.eclipse.emf.teneo.test.emf.sample.LibraryResourceCutPasteAction; @@ -51,7 +52,7 @@ import org.eclipse.emf.teneo.test.issues.ResourceUnloadAction; * All sample tests * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.91 $ + * @version $Revision: 1.92 $ */ public class AllTests { @@ -60,11 +61,13 @@ public class AllTests { "Test for org.eclipse.emf.teneo.hibernate.test.emf.sample", HibernateTestbed.instance().getConfigurations()); // suite.addTestSuite(LibraryLargeAction.class); + suite.addTestSuite(LibraryNotifyingTestAction.class); + suite.addTestSuite(LibraryTest.class); + suite.addTestSuite(ListAsIdBagAction.class); suite.addTestSuite(LibraryResourceAction.class); suite.addTestSuite(LibraryResourceVisitTreeAction.class); - suite.addTestSuite(LibraryTest.class); suite.addTestSuite(LibraryInterfaceQueryTest.class); diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java index 2e3d57362..0b761fe5c 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/schemaconstructs/AllTests.java @@ -34,7 +34,7 @@ import org.eclipse.emf.teneo.test.emf.schemaconstructs.SubstitutionzvonAction; * All tests * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.23 $ + * @version $Revision: 1.24 $ */ public class AllTests { @@ -42,13 +42,12 @@ public class AllTests { TestSuite suite = new MultiCfgTestSuite( "Test for org.eclipse.emf.teneo.hibernate.test.emf.schemaconstructs", HibernateTestbed.instance().getConfigurations()); + suite.addTestSuite(EMapAction.class); + suite.addTestSuite(EMapAsListAction.class); suite.addTestSuite(SimpleTypeAction.class); suite.addTestSuite(DateTimeAction.class); - suite.addTestSuite(EMapAction.class); - suite.addTestSuite(EMapAsListAction.class); - suite.addTestSuite(DurationAction.class); suite.addTestSuite(QNameAction.class); |