diff options
author | mtaal | 2008-09-01 12:46:11 +0000 |
---|---|---|
committer | mtaal | 2008-09-01 12:46:11 +0000 |
commit | ae14d705e68efb96ac883f0085c049fc1d03292a (patch) | |
tree | c4ea94bcc06ab02cfbc28d8f26f2afdddc3f946b /tests/org.eclipse.emf.teneo.hibernate.test/hbm | |
parent | c94221c8d207dfb2cec1e5d8532f0cc26fbf24dd (diff) | |
download | org.eclipse.emf.teneo-ae14d705e68efb96ac883f0085c049fc1d03292a.tar.gz org.eclipse.emf.teneo-ae14d705e68efb96ac883f0085c049fc1d03292a.tar.xz org.eclipse.emf.teneo-ae14d705e68efb96ac883f0085c049fc1d03292a.zip |
[243024]
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/hbm')
14 files changed, 462 insertions, 8 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_a_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_a_o_hibernate.hbm.xml new file mode 100644 index 000000000..ef80ee302 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_a_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.bz243024.impl.OneImpl" entity-name="One" abstract="false" lazy="false" discriminator-value="One" table="`one`"> + <meta attribute="eclassName">One</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</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> + <list name="manies" lazy="true" cascade="delete-orphan,save-update,replicate,delete,persist"> + <key update="true" foreign-key="one_manies"> + <column name="`one_manies_e_id`" not-null="false" unique="false"/> + </key> + <list-index column="`one_manies_idx`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" discriminator-value="Many" table="`many`"> + <meta attribute="eclassName">Many</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</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> + </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/Bz243024Action_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..13ba20186 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_e_o_hibernate.hbm.xml @@ -0,0 +1,37 @@ +<?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.bz243024.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`one`"> + <meta attribute="eclassName">One</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</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> + <list name="manies" lazy="true" cascade="delete-orphan,save-update,replicate,delete,persist"> + <key update="true" foreign-key="one_manies"> + <column name="`one_manies_e_id`" not-null="false" unique="false"/> + </key> + <list-index column="`one_manies_idx`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`many`"> + <meta attribute="eclassName">Many</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</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> + </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/Bz243024Action_mysql_s_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_s_o_hibernate.hbm.xml new file mode 100644 index 000000000..13ba20186 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz243024Action_mysql_s_o_hibernate.hbm.xml @@ -0,0 +1,37 @@ +<?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.bz243024.impl.OneImpl" entity-name="One" abstract="false" lazy="false" table="`one`"> + <meta attribute="eclassName">One</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</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> + <list name="manies" lazy="true" cascade="delete-orphan,save-update,replicate,delete,persist"> + <key update="true" foreign-key="one_manies"> + <column name="`one_manies_e_id`" not-null="false" unique="false"/> + </key> + <list-index column="`one_manies_idx`"/> + <one-to-many entity-name="Many"/> + </list> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz243024.impl.ManyImpl" entity-name="Many" abstract="false" lazy="false" table="`many`"> + <meta attribute="eclassName">Many</meta> + <meta attribute="epackage">http://www.eclipse.org/emf/teneo/samples/issues/bz243024</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> + </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/Bz245167Action_mysql_a_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_mysql_a_o_hibernate.hbm.xml new file mode 100644 index 000000000..565b709f5 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_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="false" discriminator-value="Book" table="`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="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.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" discriminator-value="Library" table="`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="false" discriminator-value="Writer" table="`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="false" discriminator-value="OneTimeWonder" table="`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="false" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="false" discriminator-value="Author" table="`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="false"/> + </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/Bz245167Action_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_mysql_e_o_hibernate.hbm.xml new file mode 100644 index 000000000..75e60c2f2 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_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="false" table="`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="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.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`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="false" table="`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="false" table="`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="false" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="false" table="`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="false"/> + </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/Bz245167Action_mysql_s_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_mysql_s_o_hibernate.hbm.xml new file mode 100644 index 000000000..75e60c2f2 --- /dev/null +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.issues/Bz245167Action_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="false" table="`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="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.issues.bz242995.impl.LibraryImpl" entity-name="Library" abstract="false" lazy="false" table="`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="false" table="`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="false" table="`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="false" constrained="true"/> + </class> + <class name="org.eclipse.emf.teneo.samples.issues.bz242995.impl.AuthorImpl" entity-name="Author" abstract="false" lazy="false" table="`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="false"/> + </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.annotations/ToOneAction_mysql_a_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_a_o_hibernate.hbm.xml index ca6dbd2b5..24320ea4a 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_a_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_a_o_hibernate.hbm.xml @@ -46,7 +46,7 @@ <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`haircolor`"/> </property> - <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head"/> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`person`"> <meta attribute="eclassName">Person</meta> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_e_o_hibernate.hbm.xml index ecde49597..d01f46e19 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_e_o_hibernate.hbm.xml @@ -43,7 +43,7 @@ <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`haircolor`"/> </property> - <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head"/> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`person`"> <meta attribute="eclassName">Person</meta> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_s_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_s_o_hibernate.hbm.xml index ecde49597..d01f46e19 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_s_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_s_o_hibernate.hbm.xml @@ -43,7 +43,7 @@ <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`haircolor`"/> </property> - <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head"/> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`person`"> <meta attribute="eclassName">Person</meta> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xjoin_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xjoin_hibernate.hbm.xml index 539dafc84..2f85f0fdd 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xjoin_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xjoin_hibernate.hbm.xml @@ -43,7 +43,7 @@ <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`haircolor`"/> </property> - <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head"/> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" table="`person`"> <meta attribute="eclassName">Person</meta> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xsingle_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xsingle_hibernate.hbm.xml index cc49c4e7b..11972d0a5 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xsingle_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.annotations/ToOneAction_mysql_xsingle_hibernate.hbm.xml @@ -46,7 +46,7 @@ <property name="hairColor" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String"> <column not-null="true" unique="false" name="`haircolor`"/> </property> - <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head"/> + <one-to-one name="person" entity-name="Person" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="head" constrained="true"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.annotations.toone.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" discriminator-value="Person" table="`person`"> <meta attribute="eclassName">Person</meta> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_a_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_a_o_hibernate.hbm.xml index ada7860a5..173d63fa9 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_a_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_a_o_hibernate.hbm.xml @@ -59,7 +59,7 @@ <column not-null="false" unique="false" name="`notcontainedchildnr_notcontainedonewaynotrequired_e_id`"/> </many-to-one> <one-to-one name="notcontainedtwowaynotrequired" entity-name="NotContainedChildNRT" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> - <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main" constrained="true"/> <one-to-one name="notcontainedtwowaynotrequirednr" entity-name="NotContainedChildNRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRImpl" entity-name="NotContainedChildNR" abstract="false" lazy="false" discriminator-value="NotContainedChildNR" table="`notcontainedchildnr`"> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_e_o_hibernate.hbm.xml index 846868864..72b2e7ea5 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_e_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_e_o_hibernate.hbm.xml @@ -56,7 +56,7 @@ <column not-null="false" unique="false" name="`notcontainedchildnr_notcontainedonewaynotrequired_e_id`"/> </many-to-one> <one-to-one name="notcontainedtwowaynotrequired" entity-name="NotContainedChildNRT" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> - <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main" constrained="true"/> <one-to-one name="notcontainedtwowaynotrequirednr" entity-name="NotContainedChildNRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRImpl" entity-name="NotContainedChildNR" abstract="false" lazy="false" table="`notcontainedchildnr`"> diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_s_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_s_o_hibernate.hbm.xml index 846868864..72b2e7ea5 100644 --- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_s_o_hibernate.hbm.xml +++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.emf.relation/Relation1to1Action_mysql_s_o_hibernate.hbm.xml @@ -56,7 +56,7 @@ <column not-null="false" unique="false" name="`notcontainedchildnr_notcontainedonewaynotrequired_e_id`"/> </many-to-one> <one-to-one name="notcontainedtwowaynotrequired" entity-name="NotContainedChildNRT" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> - <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> + <one-to-one name="notcontainedtwowayrequirednr" entity-name="NotContainedChildRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main" constrained="true"/> <one-to-one name="notcontainedtwowaynotrequirednr" entity-name="NotContainedChildNRTNR" cascade="merge,persist,save-update,lock,refresh" lazy="false" property-ref="main"/> </class> <class name="org.eclipse.emf.teneo.samples.emf.relation.relation1to1.impl.NotContainedChildNRImpl" entity-name="NotContainedChildNR" abstract="false" lazy="false" table="`notcontainedchildnr`"> |