diff options
author | mtaal | 2008-12-17 06:13:22 +0000 |
---|---|---|
committer | mtaal | 2008-12-17 06:13:22 +0000 |
commit | ecfaf9da5564dc5e05395ee48e07ad42c00ea1db (patch) | |
tree | 54c421113cf866c84fffdfdd9b455f41099fc070 /tests/org.eclipse.emf.teneo.hibernate.test | |
parent | 134ccb2dce7eefd4f6e0023ea61afc353f111b06 (diff) | |
download | org.eclipse.emf.teneo-ecfaf9da5564dc5e05395ee48e07ad42c00ea1db.tar.gz org.eclipse.emf.teneo-ecfaf9da5564dc5e05395ee48e07ad42c00ea1db.tar.xz org.eclipse.emf.teneo-ecfaf9da5564dc5e05395ee48e07ad42c00ea1db.zip |
[258266]
[258806]
[259052]
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test')
7 files changed, 464 insertions, 4 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_a_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_a_o_hibernate.hbm.xml new file mode 100644 index 000000000..f60db12d9 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_a_o_hibernate.hbm.xml @@ -0,0 +1,117 @@ +<?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.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" discriminator-value="Book" table="`book`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" 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.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" 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.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" discriminator-value="Library" table="`library`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName">Library</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="library_writers"> + <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.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" discriminator-value="Writer" table="`writer`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName">Writer</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" 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> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" discriminator-value="OneTimeWonder" table="`onetimewonder`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName">OneTimeWonder</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`id`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" discriminator-value="Author" table="`author`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName">Author</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`id`"/> + <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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </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/BZ258266Action_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..164ff5949 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_e_o_hibernate.hbm.xml @@ -0,0 +1,112 @@ +<?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.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" table="`book`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" 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.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" 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.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" table="`library`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName">Library</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="library_writers"> + <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.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" table="`writer`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName">Writer</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" 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> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" table="`onetimewonder`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName">OneTimeWonder</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`id`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" table="`author`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName">Author</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`id`"/> + <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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </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/BZ258266Action_mysql_s_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_s_o_hibernate.hbm.xml new file mode 100644 index 000000000..164ff5949 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/BZ258266Action_mysql_s_o_hibernate.hbm.xml @@ -0,0 +1,112 @@ +<?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.bz242995.impl.BookImpl" entity-name="Book" abstract="false" lazy="true" table="`book`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Book"> + <meta attribute="eclassName">Book</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" 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.ENumUserType"> + <param name="enumClass">org.eclipse.emf.teneo.samples.issues.bz242995.BookCategory</param> + </type> + </property> + <many-to-one name="author" entity-name="Writer" lazy="proxy" 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.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="true" table="`library`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Library"> + <meta attribute="eclassName">Library</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <list name="writers" lazy="true" cascade="all,delete-orphan"> + <key update="true" foreign-key="library_writers"> + <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.issues.bz242995.impl.WriterImpl" entity-name="Writer" abstract="false" lazy="true" table="`writer`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Writer"> + <meta attribute="eclassName">Writer</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</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="false" unique="false" type="java.lang.String"> + <column not-null="false" 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> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.OneTimeWonderImpl" entity-name="OneTimeWonder" abstract="false" lazy="true" table="`onetimewonder`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.OneTimeWonder"> + <meta attribute="eclassName">OneTimeWonder</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`id`"/> + <generator class="foreign"> + <param name="property">theAuthor</param> + </generator> + </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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <one-to-one name="theAuthor" entity-name="Author" cascade="merge,persist,save-update,lock,refresh" lazy="proxy" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="true" table="`author`" proxy="org.eclipse.emf.teneo.samples.issues.bz242995.Author"> + <meta attribute="eclassName">Author</meta> + <meta attribute="epackage">http:///org/eclipse/example/library.ecore</meta> + <id name="id" type="long" unsaved-value="0"> + <column not-null="true" unique="false" name="`id`"/> + <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="false" unique="false" type="java.lang.String"> + <column not-null="false" unique="false" name="`name`"/> + </property> + <one-to-one name="theBook" entity-name="OneTimeWonder" cascade="merge,persist,save-update,lock,refresh" lazy="proxy"/> + </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 7ab4107a1..e704d7f0d 100644 --- 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 @@ -44,14 +44,15 @@ import org.eclipse.emf.teneo.test.issues.TopClassesAction; * All tests * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.40 $ + * @version $Revision: 1.41 $ */ public class AllTests { public static Test suite() { - TestSuite suite = - new MultiCfgTestSuite("Test for org.eclipse.emf.teneo.hibernate.test.issues", HibernateTestbed - .instance().getConfigurations()); + TestSuite suite = new MultiCfgTestSuite( + "Test for org.eclipse.emf.teneo.hibernate.test.issues", + HibernateTestbed.instance().getConfigurations()); + suite.addTestSuite(BZ258266Action.class); suite.addTestSuite(BZ253799Action.class); suite.addTestSuite(Bz245167Action.class); diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266.hbm.xml new file mode 100644 index 000000000..6f052b4be --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266.hbm.xml @@ -0,0 +1,11 @@ +<?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> + <class name="org.eclipse.emf.teneo.hibernate.test.issues.BZ258266" lazy="false" table="ad_bz"> + <cache usage="read-write"/> + + <id name="id" type="string" column="ad_id"/> + + <property name="name" not-null="true"/> + </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/BZ258266.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266.java new file mode 100644 index 000000000..8ec75aa49 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266.java @@ -0,0 +1,50 @@ +/** + * <copyright> Copyright (c) 2005, 2006, 2007, 2008 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; + + +/** + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.1 $ + */ +public class BZ258266 { + + private String id; + private String name; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id + * the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } +} diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266Action.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266Action.java new file mode 100644 index 000000000..7bf8b5173 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/issues/BZ258266Action.java @@ -0,0 +1,57 @@ +/** + * <copyright> Copyright (c) 2005, 2006, 2007, 2008 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.Properties; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.teneo.PersistenceOptions; +import org.eclipse.emf.teneo.hibernate.HbDataStore; +import org.eclipse.emf.teneo.hibernate.HbSessionDataStore; +import org.eclipse.emf.teneo.samples.issues.bz242995.bz242995Package; +import org.eclipse.emf.teneo.test.AbstractTestAction; +import org.eclipse.emf.teneo.test.stores.TestStore; +import org.hibernate.cfg.Configuration; + +/** + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.1 $ + */ +public class BZ258266Action extends AbstractTestAction { + + public BZ258266Action() { + super(new EPackage[] { bz242995Package.eINSTANCE }); + } + + @Override + public Properties getExtraConfigurationProperties() { + final Properties props = new Properties(); + props.setProperty(PersistenceOptions.SET_PROXY, "true"); + return props; + } + + @Override + public void doAction(TestStore store) { + final HbDataStore hbds = (HbDataStore) store.getDataStore(); + + final HbSessionDataStore localDs = new HbSessionDataStore() { + + @Override + protected Configuration createConfiguration() { + final Configuration c = new Configuration(); + c.addClass(BZ258266.class); + return c; + } + }; + + localDs.setEPackages(new EPackage[] { bz242995Package.eINSTANCE }); + localDs.setProperties(hbds.getProperties()); + localDs.initialize(); + } +} |