Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2015-01-18 11:15:30 -0500
committerMartin Taal2015-01-18 11:15:30 -0500
commitb5f4566231f4f6f5f64c12227613656a46c4374f (patch)
tree0a9641a09a9ce891af9ecaa579d0186ed3207b5f
parentead3ddc8022e4a3c9867c2bedd4b2805bdee35ba (diff)
downloadorg.eclipse.emf.texo-b5f4566231f4f6f5f64c12227613656a46c4374f.tar.gz
org.eclipse.emf.texo-b5f4566231f4f6f5f64c12227613656a46c4374f.tar.xz
org.eclipse.emf.texo-b5f4566231f4f6f5f64c12227613656a46c4374f.zip
[423155] Fixes - @AttributeOverride(s) from annotation model not generated
-rwxr-xr-xgenerator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/EReferenceORMAnnotator.java13
-rwxr-xr-xgenerator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMGenerator.java28
-rw-r--r--generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java4
-rw-r--r--tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155-orm.annotationsmodel54
-rw-r--r--tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155.ecore17
-rwxr-xr-xtests/org.eclipse.emf.texo.modelgenerator.test/src/org/eclipse/emf/texo/modelgenerator/test/TestModel.java1
-rw-r--r--tests/org.eclipse.emf.texo.test.model/META-INF/MANIFEST.MF7
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz423155-persistence.xml103
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz424797-persistence.xml105
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz423155-orm.xml45
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz424797-orm.xml30
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155.ecore37
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelFactory.java374
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelPackage.java303
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Embedded423155.java92
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Main423155.java147
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Embedded423155Dao.java30
-rw-r--r--tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Main423155Dao.java30
-rwxr-xr-xtests/org.eclipse.emf.texo.test.model/src/org/eclipse/emf/texo/test/model/TestModelPackageProvider.java4
19 files changed, 1419 insertions, 5 deletions
diff --git a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/EReferenceORMAnnotator.java b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/EReferenceORMAnnotator.java
index 1614b764..8cd8c353 100755
--- a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/EReferenceORMAnnotator.java
+++ b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/EReferenceORMAnnotator.java
@@ -55,7 +55,7 @@ import org.eclipse.emf.texo.utils.ModelUtils;
*/
public class EReferenceORMAnnotator extends EStructuralFeatureORMAnnotator implements
- Annotator<EReferenceORMAnnotation> {
+Annotator<EReferenceORMAnnotation> {
/*
* (non-Javadoc)
@@ -91,7 +91,7 @@ public class EReferenceORMAnnotator extends EStructuralFeatureORMAnnotator imple
final EReference eOpposite = eReference.getEOpposite();
if (!isPartOfFeatureMap && eReference.isMany()) {
- if (doAddConverter(eReferenceModelGenAnnotation)) {
+ if (doAddConverter(eReferenceModelGenAnnotation) || annotation.getEmbedded() != null) {
addElementCollection(annotation);
} else if (annotation.getElementCollection() != null) {
annotateElementCollection(annotation);
@@ -143,6 +143,15 @@ public class EReferenceORMAnnotator extends EStructuralFeatureORMAnnotator imple
final EReferenceModelGenAnnotation eReferenceModelGenAnnotation = (EReferenceModelGenAnnotation) getAnnotationManager()
.getAnnotation(eReference, ModelcodegeneratorPackage.eINSTANCE.getEReferenceModelGenAnnotation());
+ // clear the embedded, we can only have one of the two...
+ if (annotation.getEmbedded() != null) {
+ annotation.getElementCollection().getAttributeOverride().addAll(annotation.getEmbedded().getAttributeOverride());
+ annotation.getElementCollection().getAssociationOverride()
+ .addAll(annotation.getEmbedded().getAssociationOverride());
+ annotation.getElementCollection().setAttributeType(annotation.getEmbedded().getAttributeType());
+ annotation.setEmbedded(null);
+ }
+
final ElementCollection elementCollection = annotation.getElementCollection();
// make the access field if not changeable, as there won't be a setter
diff --git a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMGenerator.java b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMGenerator.java
index 6e2bcfec..d44943c8 100755
--- a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMGenerator.java
+++ b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMGenerator.java
@@ -120,7 +120,9 @@ public class ORMGenerator extends BaseGenerateAction {
}
final Object value = annotationOwner.eGet(eReference);
- if (value instanceof BaseOrmAnnotation) {
+ if (value instanceof Collection<?>) {
+ sb.append(getAnnotationArray((EClass) eReference.getEType(), identifier, (Collection<?>) value));
+ } else if (value instanceof BaseOrmAnnotation) {
if (sb.length() > 0) {
sb.append("\n"); //$NON-NLS-1$
}
@@ -131,6 +133,30 @@ public class ORMGenerator extends BaseGenerateAction {
return sb.toString();
}
+ // handle a list of annotations
+ private static String getAnnotationArray(EClass eClassifier, String identifier, Collection<?> annotations) {
+ final StringBuffer sb = new StringBuffer();
+ sb.append("\n@" + ORMJavaAnnotationGenerator.getInstance().getJavaPackage(eClassifier) + "."
+ + eClassifier.getName() + "s({");
+ boolean validContent = false;
+ for (Object value : annotations) {
+ if (value instanceof BaseOrmAnnotation) {
+ if (validContent) {
+ sb.append(", ");
+ }
+ sb.append("\n"); //$NON-NLS-1$
+ sb.append(((BaseOrmAnnotation) value).getJavaAnnotation(identifier));
+ validContent = true;
+ }
+ }
+
+ if (!validContent) {
+ return "";
+ }
+ sb.append("\n})");
+ return sb.toString();
+ }
+
// if the type has an accesstype set then generate the javaannotation
// on the correct location
private static boolean isValidIdentifier(EObject annotation, String identifier) {
diff --git a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java
index 60ae121e..51543f0c 100644
--- a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java
+++ b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java
@@ -210,7 +210,7 @@ public class ORMJavaAnnotationGenerator {
continue;
}
separateAnnotation
- .append("@" + getJavaPackage(eFeature.getEType()) + "." + pluralize(upperCaseFirst(getName(eFeature))) + "({"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ .append("@" + getJavaPackage(eFeature.getEType()) + "." + pluralize(upperCaseFirst(getName(eFeature))) + "({"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
boolean addArrayComma = false;
for (Object val : values) {
if (val instanceof BaseOrmAnnotation) {
@@ -327,7 +327,7 @@ public class ORMJavaAnnotationGenerator {
+ "." + enumerator.getLiteral() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
- private String getJavaPackage(EClassifier eClassifier) {
+ public String getJavaPackage(EClassifier eClassifier) {
for (EClassifier chkEClassifier : eclipseLinkEClassifiers) {
if (chkEClassifier == eClassifier) {
diff --git a/tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155-orm.annotationsmodel b/tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155-orm.annotationsmodel
new file mode 100644
index 00000000..feb5c634
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155-orm.annotationsmodel
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<annotationsmodel:AnnotatedModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:annotationsmodel="http://www.eclipse.org/emf/texo/annotations/model" xmlns:ormannotations="http://www.eclipse.org/emf/texo/orm/ormannotations">
+ <annotatedEPackages>
+ <ePackage href="bz423155.ecore#/"/>
+ <ePackageAnnotations xsi:type="ormannotations:EPackageORMAnnotation" generateFullDbSchemaNames="false" maximumSqlNameLength="255" lowerCasedNames="false" upperCasedNames="false" enforceUniqueNames="false" useJoinTablesForContainment="false" useJoinTablesForNonContainment="true" generateJavaAnnotations="false" addOrderColumnToListMappings="false" renameSQLReservedNames="false" uniqueEntityNames="true" setDelimitedIdentifierTagInORM="true"/>
+ <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
+ <eClass href="bz423155.ecore#//Embedded423155"/>
+ <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
+ <embeddable/>
+ </eClassAnnotations>
+ </annotatedEClassifiers>
+ <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
+ <eClass href="bz423155.ecore#//Main423155"/>
+ <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
+ <eReference href="bz423155.ecore#//Main423155/embedded1"/>
+ <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation" attributeOverride="">
+ <embedded>
+ <attributeOverride description="" name="name1">
+ <column name="nameOne"/>
+ </attributeOverride>
+ <attributeOverride description="" name="name2">
+ <column name="nameTwo"/>
+ </attributeOverride>
+ </embedded>
+ </eReferenceAnnotations>
+ </annotatedEStructuralFeatures>
+ <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
+ <eReference href="bz423155.ecore#//Main423155/embedded2"/>
+ <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation" attributeOverride="">
+ <elementCollection>
+ <attributeOverride name="name1">
+ <column name="nameOne"/>
+ </attributeOverride>
+ <attributeOverride name="name2">
+ <column name="nameTwo"/>
+ </attributeOverride>
+ </elementCollection>
+ </eReferenceAnnotations>
+ </annotatedEStructuralFeatures>
+ <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
+ <eReference href="bz423155.ecore#//Main423155/embedded3"/>
+ <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
+ <embedded name="embedded3"/>
+ <attributeOverride description="" name="name1">
+ <column name="nameOne"/>
+ </attributeOverride>
+ <attributeOverride description="" name="name2">
+ <column name="nameTwo"/>
+ </attributeOverride>
+ </eReferenceAnnotations>
+ </annotatedEStructuralFeatures>
+ </annotatedEClassifiers>
+ </annotatedEPackages>
+</annotationsmodel:AnnotatedModel>
diff --git a/tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155.ecore b/tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155.ecore
new file mode 100644
index 00000000..634fc232
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.modelgenerator.test/models/issues/bz423155.ecore
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="Bz423155" nsURI="http://www.eclipse.org/emf/texo/test/model/issues/bz423155"
+ nsPrefix="Bz423155">
+ <eClassifiers xsi:type="ecore:EClass" name="Embedded423155">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Main423155">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="embedded1" upperBound="-1"
+ eType="#//Embedded423155"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="embedded2" upperBound="-1"
+ eType="#//Embedded423155"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="embedded3" upperBound="-1"
+ eType="#//Embedded423155"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.emf.texo.modelgenerator.test/src/org/eclipse/emf/texo/modelgenerator/test/TestModel.java b/tests/org.eclipse.emf.texo.modelgenerator.test/src/org/eclipse/emf/texo/modelgenerator/test/TestModel.java
index d754afce..aea8c65c 100755
--- a/tests/org.eclipse.emf.texo.modelgenerator.test/src/org/eclipse/emf/texo/modelgenerator/test/TestModel.java
+++ b/tests/org.eclipse.emf.texo.modelgenerator.test/src/org/eclipse/emf/texo/modelgenerator/test/TestModel.java
@@ -140,6 +140,7 @@ public class TestModel {
urls.add("issues/bz420913.ecore"); //$NON-NLS-1$
urls.add("issues/bz420913_NotBiDirectional.ecore"); //$NON-NLS-1$
urls.add("issues/bz422811.ecore"); //$NON-NLS-1$
+ urls.add("issues/bz423155.ecore"); //$NON-NLS-1$
urls.add("issues/bz423760.ecore"); //$NON-NLS-1$
urls.add("issues/bz424797.ecore"); //$NON-NLS-1$
urls.add("issues/bz444321.ecore"); //$NON-NLS-1$
diff --git a/tests/org.eclipse.emf.texo.test.model/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.texo.test.model/META-INF/MANIFEST.MF
index 6ef33237..669ce796 100644
--- a/tests/org.eclipse.emf.texo.test.model/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.emf.texo.test.model/META-INF/MANIFEST.MF
@@ -63,13 +63,20 @@ Export-Package: org.eclipse.emf.texo.server.model.request;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz411874;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz411874.dao;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz415716;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz415716.dao,
org.eclipse.emf.texo.test.model.issues.bz420913;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz420913.dao;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz420913notbidirectional;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz420913notbidirectional.dao;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz422811;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz422811.dao;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz423155;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz423155.dao;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bz423760;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz424797;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz424797.dao;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz444321;version="0.9.0",
+ org.eclipse.emf.texo.test.model.issues.bz444321.dao;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bzwrongfeatureid;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.bzwrongfeatureid.dao;version="0.9.0",
org.eclipse.emf.texo.test.model.issues.instanceclassset;version="0.9.0",
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz423155-persistence.xml b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz423155-persistence.xml
new file mode 100644
index 00000000..5305bb35
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz423155-persistence.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+ <persistence-unit name="Bz423155-hsqldb">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/mapping-files/base/identifiable-orm.xml</mapping-file>
+ <mapping-file>META-INF/mapping-files/issues/Bz423155-orm.xml</mapping-file>
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:Bz423155"/>
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz423155-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz423155-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+ <persistence-unit name="Bz423155-class-hsqldb">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <class>org.eclipse.emf.texo.test.model.base.identifiable.Identifiable</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz423155.Embedded423155</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz423155.Main423155</class>
+
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:classBz423155"/>
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz423155-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz423155-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+ <persistence-unit name="Bz423155-mysql">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/mapping-files/base/identifiable-orm.xml</mapping-file>
+ <mapping-file>META-INF/mapping-files/issues/Bz423155-orm.xml</mapping-file>
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="Mysql"/>
+ <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/Bz423155"/>
+ <property name="javax.persistence.jdbc.user" value="root"/>
+ <property name="javax.persistence.jdbc.password" value="root"/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz423155-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz423155-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+ <persistence-unit name="Bz423155-class-mysql">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/mapping-files/base/identifiable-orm.xml</mapping-file>
+ <class>org.eclipse.emf.texo.test.model.base.identifiable.Identifiable</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz423155.Embedded423155</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz423155.Main423155</class>
+
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="Mysql"/>
+ <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/classBz423155"/>
+ <property name="javax.persistence.jdbc.user" value="root"/>
+ <property name="javax.persistence.jdbc.password" value="root"/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz423155-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz423155-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+</persistence> \ No newline at end of file
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz424797-persistence.xml b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz424797-persistence.xml
new file mode 100644
index 00000000..7c95e478
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/Bz424797-persistence.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+ <persistence-unit name="Bz424797-hsqldb">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/mapping-files/base/identifiable-orm.xml</mapping-file>
+ <mapping-file>META-INF/mapping-files/issues/Bz424797-orm.xml</mapping-file>
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:Bz424797"/>
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz424797-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz424797-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+ <persistence-unit name="Bz424797-class-hsqldb">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <class>org.eclipse.emf.texo.test.model.base.identifiable.Identifiable</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz424797.AbstractSuper424797</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz424797.Sub4242797</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz424797.Other4242797</class>
+
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:classBz424797"/>
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz424797-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz424797-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+ <persistence-unit name="Bz424797-mysql">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/mapping-files/base/identifiable-orm.xml</mapping-file>
+ <mapping-file>META-INF/mapping-files/issues/Bz424797-orm.xml</mapping-file>
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="Mysql"/>
+ <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/Bz424797"/>
+ <property name="javax.persistence.jdbc.user" value="root"/>
+ <property name="javax.persistence.jdbc.password" value="root"/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz424797-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz424797-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+ <persistence-unit name="Bz424797-class-mysql">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/mapping-files/base/identifiable-orm.xml</mapping-file>
+ <class>org.eclipse.emf.texo.test.model.base.identifiable.Identifiable</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz424797.AbstractSuper424797</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz424797.Sub4242797</class>
+ <class>org.eclipse.emf.texo.test.model.issues.bz424797.Other4242797</class>
+
+ <properties>
+ <property name="eclipselink.session.customizer" value="org.eclipse.emf.texo.test.TexoSessionCustomizer"/>
+ <property name="eclipselink.target-database" value="Mysql"/>
+ <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/classBz424797"/>
+ <property name="javax.persistence.jdbc.user" value="root"/>
+ <property name="javax.persistence.jdbc.password" value="root"/>
+
+ <!-- EclipseLink should create the database schema automatically -->
+
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode" value="database" />
+ <!-- property name="eclipselink.drop-ddl-jdbc-file-name" value="Bz424797-drop.sql"/>
+ <property name="eclipselink.create-ddl-jdbc-file-name" value="Bz424797-create.sql"/>
+ <property name="eclipselink.application-location" value="ddl/"/-->
+ <property name="eclipselink.logging.level" value="WARNING" />
+ </properties>
+ </persistence-unit>
+
+</persistence> \ No newline at end of file
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz423155-orm.xml b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz423155-orm.xml
new file mode 100644
index 00000000..8d199316
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz423155-orm.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ASCII"?>
+<orm:entity-mappings xmlns:orm="http://www.eclipse.org/eclipselink/xsds/persistence/orm" version="2.3">
+ <orm:persistence-unit-metadata>
+ <orm:persistence-unit-defaults>
+ <orm:delimited-identifiers/>
+ </orm:persistence-unit-defaults>
+ </orm:persistence-unit-metadata>
+ <orm:access>FIELD</orm:access>
+ <orm:entity class="org.eclipse.emf.texo.test.model.issues.bz423155.Main423155" name="Bz423155_Main423155">
+ <orm:discriminator-column length="255"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestObjectConverter" name="TexoTestObjectConverter"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestQNameConverter" name="TexoTestQNameConverter"/>
+ <orm:attributes>
+ <orm:element-collection name="embedded1">
+ <orm:order-column/>
+ <orm:attribute-override name="name1">
+ <orm:description></orm:description>
+ <orm:column name="nameOne"/>
+ </orm:attribute-override>
+ <orm:attribute-override name="name2">
+ <orm:description></orm:description>
+ <orm:column name="nameTwo"/>
+ </orm:attribute-override>
+ </orm:element-collection>
+ <orm:element-collection name="embedded2">
+ <orm:order-column/>
+ <orm:attribute-override name="name1">
+ <orm:column name="nameOne"/>
+ </orm:attribute-override>
+ <orm:attribute-override name="name2">
+ <orm:column name="nameTwo"/>
+ </orm:attribute-override>
+ </orm:element-collection>
+ <orm:element-collection name="embedded3">
+ <orm:order-column/>
+ </orm:element-collection>
+ </orm:attributes>
+ </orm:entity>
+ <orm:embeddable class="org.eclipse.emf.texo.test.model.issues.bz423155.Embedded423155">
+ <orm:attributes>
+ <orm:basic name="name1"/>
+ <orm:basic name="name2"/>
+ </orm:attributes>
+ </orm:embeddable>
+</orm:entity-mappings> \ No newline at end of file
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz424797-orm.xml b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz424797-orm.xml
new file mode 100644
index 00000000..67ccb325
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/META-INF/mapping-files/issues/Bz424797-orm.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<orm:entity-mappings xmlns:orm="http://www.eclipse.org/eclipselink/xsds/persistence/orm" version="2.3">
+ <orm:persistence-unit-metadata>
+ <orm:persistence-unit-defaults>
+ <orm:delimited-identifiers/>
+ </orm:persistence-unit-defaults>
+ </orm:persistence-unit-metadata>
+ <orm:access>FIELD</orm:access>
+ <orm:entity class="org.eclipse.emf.texo.test.model.issues.bz424797.AbstractSuper424797" name="Bz424797_AbstractSuper424797">
+ <orm:table name="FKT_Bz424797_AbstractSuper424797"/>
+ <orm:discriminator-column length="255"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestObjectConverter" name="TexoTestObjectConverter"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestQNameConverter" name="TexoTestQNameConverter"/>
+ <orm:attributes/>
+ </orm:entity>
+ <orm:entity class="org.eclipse.emf.texo.test.model.issues.bz424797.Sub4242797" name="Bz424797_Sub4242797">
+ <orm:table name="FKT_Bz424797_Sub4242797"/>
+ <orm:primary-key-join-column name="Bz424797_Sub4242797_parent_id"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestObjectConverter" name="TexoTestObjectConverter"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestQNameConverter" name="TexoTestQNameConverter"/>
+ <orm:attributes/>
+ </orm:entity>
+ <orm:entity class="org.eclipse.emf.texo.test.model.issues.bz424797.Other4242797" name="Bz424797_Other4242797">
+ <orm:table name="FKT_Bz424797_Other4242797"/>
+ <orm:discriminator-column length="255"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestObjectConverter" name="TexoTestObjectConverter"/>
+ <orm:converter class="org.eclipse.emf.texo.test.TexoTestQNameConverter" name="TexoTestQNameConverter"/>
+ <orm:attributes/>
+ </orm:entity>
+</orm:entity-mappings> \ No newline at end of file
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155.ecore b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155.ecore
new file mode 100644
index 00000000..9e5fa66c
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155.ecore
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="Bz423155" nsURI="http://www.eclipse.org/emf/texo/test/model/issues/bz423155"
+ nsPrefix="Bz423155">
+ <eClassifiers xsi:type="ecore:EClass" name="Embedded423155" eSuperTypes="http://www.eclipse.org/emf/texo/test/model/base/identifiable#//Identifiable">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="org.eclipse.emf.texo">
+ <details key="java.member" value="name1"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="org.eclipse.emf.texo">
+ <details key="java.member" value="name2"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Main423155" eSuperTypes="http://www.eclipse.org/emf/texo/test/model/base/identifiable#//Identifiable">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="embedded1" upperBound="-1"
+ eType="#//Embedded423155">
+ <eAnnotations source="org.eclipse.emf.texo">
+ <details key="java.member" value="embedded1"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="embedded2" upperBound="-1"
+ eType="#//Embedded423155">
+ <eAnnotations source="org.eclipse.emf.texo">
+ <details key="java.member" value="embedded2"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="embedded3" upperBound="-1"
+ eType="#//Embedded423155">
+ <eAnnotations source="org.eclipse.emf.texo">
+ <details key="java.member" value="embedded3"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelFactory.java b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelFactory.java
new file mode 100644
index 00000000..f54f4b4e
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelFactory.java
@@ -0,0 +1,374 @@
+package org.eclipse.emf.texo.test.model.issues.bz423155;
+
+import java.util.List;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.texo.model.AbstractModelFeatureMapEntry;
+import org.eclipse.emf.texo.model.ModelFactory;
+import org.eclipse.emf.texo.model.ModelFeatureMapEntry;
+import org.eclipse.emf.texo.model.ModelObject;
+import org.eclipse.emf.texo.model.ModelPackage;
+import org.eclipse.emf.texo.test.model.base.identifiable.IdentifiableModelFactory;
+
+/**
+ * The <b>{@link ModelFactory}</b> for the types of this model: Bz423155. It contains code to create instances
+ * {@link ModelObject} wrappers and instances for EClasses and convert objects back and forth from their String (XML)
+ * representation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class Bz423155ModelFactory implements ModelFactory {
+
+ /**
+ * Creates an instance for an {@link EClass} <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eClass
+ * creates a Object instance for this EClass
+ * @return an object representing the eClass
+ * @generated
+ */
+ public Object create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case Bz423155ModelPackage.EMBEDDED423155_CLASSIFIER_ID:
+ return createEmbedded423155();
+ case Bz423155ModelPackage.MAIN423155_CLASSIFIER_ID:
+ return createMain423155();
+ default:
+ throw new IllegalArgumentException("The EClass '" + eClass.getName()
+ + "' is not a valid EClass for this EPackage");
+ }
+ }
+
+ /**
+ * Wraps an object in a {@link ModelObject}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eClass
+ * the EClass of the object
+ * @param adaptee
+ * the object being wrapped/adapted
+ * @return the wrapper {@link ModelObject}
+ * @generated
+ */
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public <T> ModelObject<T> createModelObject(EClass eClass, T adaptee) {
+ ModelObject<Object> modelObject = null;
+ switch (eClass.getClassifierID()) {
+ case Bz423155ModelPackage.EMBEDDED423155_CLASSIFIER_ID:
+ modelObject = new Embedded423155ModelObject();
+ break;
+ case Bz423155ModelPackage.MAIN423155_CLASSIFIER_ID:
+ modelObject = new Main423155ModelObject();
+ break;
+ default:
+ throw new IllegalArgumentException("The EClass '" + eClass + "' is not defined in this EPackage");
+ }
+ modelObject.setTarget(adaptee);
+ return (ModelObject<T>) modelObject;
+ }
+
+ /**
+ * Creates a feature map entry instance for a certain EStructuralFeature.
+ *
+ * @param eFeature
+ * the feature map feature
+ * @return the pojo feature map entry
+ * @generated
+ */
+ public Object createFeatureMapEntry(EStructuralFeature eFeature) {
+ throw new IllegalArgumentException("The EStructuralFeature '" + eFeature
+ + "' is not a valid feature map in this EPackage");
+ }
+
+ /**
+ * Wraps a feature map entry pojo in a {@link AbstractModelFeatureMapEntry}. If the feature map entry is null then a
+ * new one is created and <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eFeature
+ * the feature map feature of the object
+ * @param adaptee
+ * the pojo feature map entry being wrapped/adapted
+ * @return the wrapper {@link ModelFeatureMapEntry}
+ * @generated
+ */
+ public ModelFeatureMapEntry<?> createModelFeatureMapEntry(EStructuralFeature eFeature, Object adaptee) {
+ throw new IllegalArgumentException("The EStructuralFeature '" + eFeature
+ + "' is not a valid feature map in this EPackage");
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the model object representing the EClass Embedded423155
+ * @generated
+ */
+ public Embedded423155 createEmbedded423155() {
+ return new Embedded423155();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the model object representing the EClass Main423155
+ * @generated
+ */
+ public Main423155 createMain423155() {
+ return new Main423155();
+ }
+
+ /**
+ * Converts an instance of an {@link EDataType} to a String. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eDataType
+ * the {@link EDataType} defining the type
+ * @param value
+ * the object to convert, if the value is null then null is returned.
+ * @generated
+ */
+ public Object createFromString(EDataType eDataType, String value) {
+ switch (eDataType.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The EDatatype '" + eDataType + "' is not defined in this EPackage");
+ }
+ }
+
+ /**
+ * Converts an instance of an {@link EDataType} to a String. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eDataType
+ * the {@link EDataType} defining the type
+ * @param value
+ * the object to convert, if value == null then null is returned
+ * @generated
+ */
+ public String convertToString(EDataType eDataType, Object value) {
+ switch (eDataType.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The EDatatype '" + eDataType + "' is not defined in this EPackage.");
+ }
+ }
+
+ /**
+ * The adapter/wrapper for the EClass '<em><b>Embedded423155</b></em>'.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param <E>
+ * the domain model java class
+ *
+ * @generated
+ */
+ public static class Embedded423155ModelObject<E extends Embedded423155> extends
+ IdentifiableModelFactory.IdentifiableModelObject<E> {
+ /**
+ * @generated
+ */
+ @Override
+ public EClass eClass() {
+ return Bz423155ModelPackage.INSTANCE.getEmbedded423155EClass();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ModelPackage getModelPackage() {
+ return Bz423155ModelPackage.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Class<?> getTargetClass() {
+ return Embedded423155.class;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object eGet(EStructuralFeature eStructuralFeature) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+ case Bz423155ModelPackage.EMBEDDED423155_DB_ID_FEATURE_ID:
+ return getTarget().getDb_Id();
+ case Bz423155ModelPackage.EMBEDDED423155_DB_VERSION_FEATURE_ID:
+ return getTarget().getDb_version();
+ case Bz423155ModelPackage.EMBEDDED423155_NAME1_FEATURE_ID:
+ return getTarget().getName1();
+ case Bz423155ModelPackage.EMBEDDED423155_NAME2_FEATURE_ID:
+ return getTarget().getName2();
+ default:
+ return super.eGet(eStructuralFeature);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void eSet(EStructuralFeature eStructuralFeature, Object value) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+ case Bz423155ModelPackage.EMBEDDED423155_NAME1_FEATURE_ID:
+ getTarget().setName1((String) value);
+ return;
+ case Bz423155ModelPackage.EMBEDDED423155_NAME2_FEATURE_ID:
+ getTarget().setName2((String) value);
+ return;
+ default:
+ super.eSet(eStructuralFeature, value);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean eAddTo(EStructuralFeature eStructuralFeature, Object value) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+
+ default:
+ return super.eAddTo(eStructuralFeature, value);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean eRemoveFrom(EStructuralFeature eStructuralFeature, Object value) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+
+ default:
+ return super.eRemoveFrom(eStructuralFeature, value);
+ }
+ }
+ }
+
+ /**
+ * The adapter/wrapper for the EClass '<em><b>Main423155</b></em>'.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param <E>
+ * the domain model java class
+ *
+ * @generated
+ */
+ public static class Main423155ModelObject<E extends Main423155> extends
+ IdentifiableModelFactory.IdentifiableModelObject<E> {
+ /**
+ * @generated
+ */
+ @Override
+ public EClass eClass() {
+ return Bz423155ModelPackage.INSTANCE.getMain423155EClass();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ModelPackage getModelPackage() {
+ return Bz423155ModelPackage.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Class<?> getTargetClass() {
+ return Main423155.class;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object eGet(EStructuralFeature eStructuralFeature) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+ case Bz423155ModelPackage.MAIN423155_DB_ID_FEATURE_ID:
+ return getTarget().getDb_Id();
+ case Bz423155ModelPackage.MAIN423155_DB_VERSION_FEATURE_ID:
+ return getTarget().getDb_version();
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED1_FEATURE_ID:
+ return getTarget().getEmbedded1();
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED2_FEATURE_ID:
+ return getTarget().getEmbedded2();
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED3_FEATURE_ID:
+ return getTarget().getEmbedded3();
+ default:
+ return super.eGet(eStructuralFeature);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(EStructuralFeature eStructuralFeature, Object value) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED1_FEATURE_ID:
+ getTarget().setEmbedded1((List<Embedded423155>) value);
+ return;
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED2_FEATURE_ID:
+ getTarget().setEmbedded2((List<Embedded423155>) value);
+ return;
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED3_FEATURE_ID:
+ getTarget().setEmbedded3((List<Embedded423155>) value);
+ return;
+ default:
+ super.eSet(eStructuralFeature, value);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean eAddTo(EStructuralFeature eStructuralFeature, Object value) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED1_FEATURE_ID:
+ return getTarget().getEmbedded1().add((Embedded423155) value);
+
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED2_FEATURE_ID:
+ return getTarget().getEmbedded2().add((Embedded423155) value);
+
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED3_FEATURE_ID:
+ return getTarget().getEmbedded3().add((Embedded423155) value);
+ default:
+ return super.eAddTo(eStructuralFeature, value);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean eRemoveFrom(EStructuralFeature eStructuralFeature, Object value) {
+ final int featureID = eClass().getFeatureID(eStructuralFeature);
+ switch (featureID) {
+
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED1_FEATURE_ID:
+ return getTarget().getEmbedded1().remove(value);
+
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED2_FEATURE_ID:
+ return getTarget().getEmbedded2().remove(value);
+
+ case Bz423155ModelPackage.MAIN423155_EMBEDDED3_FEATURE_ID:
+ return getTarget().getEmbedded3().remove(value);
+ default:
+ return super.eRemoveFrom(eStructuralFeature, value);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelPackage.java b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelPackage.java
new file mode 100644
index 00000000..943f30a4
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Bz423155ModelPackage.java
@@ -0,0 +1,303 @@
+package org.eclipse.emf.texo.test.model.issues.bz423155;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.texo.model.ModelFactory;
+import org.eclipse.emf.texo.model.ModelPackage;
+import org.eclipse.emf.texo.model.ModelResolver;
+import org.eclipse.emf.texo.server.store.DaoRegistry;
+import org.eclipse.emf.texo.test.model.base.identifiable.IdentifiableModelPackage;
+import org.eclipse.emf.texo.test.model.issues.bz423155.dao.Embedded423155Dao;
+import org.eclipse.emf.texo.test.model.issues.bz423155.dao.Main423155Dao;
+import org.eclipse.emf.texo.utils.ModelUtils;
+
+/**
+ * The <b>Package</b> for the model '<em><b>Bz423155</b></em>'. It contains initialization code and access to the
+ * Factory to instantiate types of this package.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class Bz423155ModelPackage extends ModelPackage {
+
+ /**
+ * Is set when the package has been initialized.
+ *
+ * @generated
+ */
+ private static boolean isInitialized = false;
+
+ /**
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final String NS_URI = "http://www.eclipse.org/emf/texo/test/model/issues/bz423155";
+
+ /**
+ * The {@link ModelFactory} for this package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final Bz423155ModelFactory MODELFACTORY = new Bz423155ModelFactory();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int EMBEDDED423155_CLASSIFIER_ID = 0;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int EMBEDDED423155_DB_ID_FEATURE_ID = 0;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int EMBEDDED423155_DB_VERSION_FEATURE_ID = 1;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int EMBEDDED423155_NAME1_FEATURE_ID = 2;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int EMBEDDED423155_NAME2_FEATURE_ID = 3;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int MAIN423155_CLASSIFIER_ID = 1;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int MAIN423155_DB_ID_FEATURE_ID = 0;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int MAIN423155_DB_VERSION_FEATURE_ID = 1;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int MAIN423155_EMBEDDED1_FEATURE_ID = 2;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int MAIN423155_EMBEDDED2_FEATURE_ID = 3;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int MAIN423155_EMBEDDED3_FEATURE_ID = 4;
+
+ /**
+ * The static member with the instance of this {@link ModelPackage}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final Bz423155ModelPackage INSTANCE = initialize();
+
+ /**
+ * Initializes this {@link ModelPackage}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an initialized instance of this class
+ *
+ * @generated
+ */
+ public static Bz423155ModelPackage initialize() {
+
+ if (isInitialized) {
+ return (Bz423155ModelPackage) ModelResolver.getInstance().getModelPackage(NS_URI);
+ }
+
+ final Bz423155ModelPackage modelPackage = new Bz423155ModelPackage();
+
+ ModelResolver.getInstance().registerModelPackage(modelPackage);
+
+ // read the model from the ecore file, the EPackage is registered in the EPackage.Registry
+ // see the ModelResolver getEPackageRegistry method
+ ModelUtils.readEPackagesFromFile(modelPackage);
+
+ isInitialized = true;
+
+ IdentifiableModelPackage.initialize();
+
+ // force the initialization of the EFactory proxy
+ modelPackage.getEPackage();
+
+ // register the relation between a Class and its EClassifier
+ ModelResolver.getInstance().registerClassModelMapping(Embedded423155.class, modelPackage.getEmbedded423155EClass(),
+ modelPackage);
+ ModelResolver.getInstance().registerClassModelMapping(Main423155.class, modelPackage.getMain423155EClass(),
+ modelPackage);
+
+ DaoRegistry.getInstance().registerDao(Embedded423155.class, Embedded423155Dao.class);
+ DaoRegistry.getInstance().registerDao(Main423155.class, Main423155Dao.class);
+
+ // and return ourselves
+ return modelPackage;
+ }
+
+ /**
+ * Returns the {@link ModelFactory} of this ModelPackage. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the {@link Bz423155ModelFactory} instance.
+ * @generated
+ */
+ @Override
+ public Bz423155ModelFactory getModelFactory() {
+ return MODELFACTORY;
+ }
+
+ /**
+ * Returns the nsUri of the {@link EPackage} managed by this Package instance. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the nsUri of the EPackage
+ * @generated
+ */
+ @Override
+ public String getNsURI() {
+ return NS_URI;
+ }
+
+ /**
+ * Returns the name of the ecore file containing the ecore model of the {@link EPackage} managed here. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the name of the ecore file
+ * @generated
+ */
+ @Override
+ public String getEcoreFileName() {
+ return "Bz423155.ecore";
+ }
+
+ /**
+ * Returns the {@link EClass} '<em><b>Embedded423155</b></em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EClass} '<em><b>Embedded423155</b></em>'
+ * @generated
+ */
+ public EClass getEmbedded423155EClass() {
+ return (EClass) getEPackage().getEClassifiers().get(EMBEDDED423155_CLASSIFIER_ID);
+ }
+
+ /**
+ * Returns the {@link EStructuralFeature} '<em><b>Embedded423155.name1</b></em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '<em><b>Embedded423155.name1</b></em>'.
+ * @generated
+ */
+ public EAttribute getEmbedded423155_Name1() {
+ return (EAttribute) getEmbedded423155EClass().getEAllStructuralFeatures().get(EMBEDDED423155_NAME1_FEATURE_ID);
+ }
+
+ /**
+ * Returns the {@link EStructuralFeature} '<em><b>Embedded423155.name2</b></em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '<em><b>Embedded423155.name2</b></em>'.
+ * @generated
+ */
+ public EAttribute getEmbedded423155_Name2() {
+ return (EAttribute) getEmbedded423155EClass().getEAllStructuralFeatures().get(EMBEDDED423155_NAME2_FEATURE_ID);
+ }
+
+ /**
+ * Returns the {@link EClass} '<em><b>Main423155</b></em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EClass} '<em><b>Main423155</b></em>'
+ * @generated
+ */
+ public EClass getMain423155EClass() {
+ return (EClass) getEPackage().getEClassifiers().get(MAIN423155_CLASSIFIER_ID);
+ }
+
+ /**
+ * Returns the {@link EStructuralFeature} '<em><b>Main423155.embedded1</b></em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '<em><b>Main423155.embedded1</b></em>'.
+ * @generated
+ */
+ public EReference getMain423155_Embedded1() {
+ return (EReference) getMain423155EClass().getEAllStructuralFeatures().get(MAIN423155_EMBEDDED1_FEATURE_ID);
+ }
+
+ /**
+ * Returns the {@link EStructuralFeature} '<em><b>Main423155.embedded2</b></em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '<em><b>Main423155.embedded2</b></em>'.
+ * @generated
+ */
+ public EReference getMain423155_Embedded2() {
+ return (EReference) getMain423155EClass().getEAllStructuralFeatures().get(MAIN423155_EMBEDDED2_FEATURE_ID);
+ }
+
+ /**
+ * Returns the {@link EStructuralFeature} '<em><b>Main423155.embedded3</b></em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '<em><b>Main423155.embedded3</b></em>'.
+ * @generated
+ */
+ public EReference getMain423155_Embedded3() {
+ return (EReference) getMain423155EClass().getEAllStructuralFeatures().get(MAIN423155_EMBEDDED3_FEATURE_ID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eClassifier
+ * the {@link EClassifier}
+ * @return the class implementing a specific {@link EClass}.
+ * @generated
+ */
+ @Override
+ public Class<?> getEClassifierClass(EClassifier eClassifier) {
+ switch (eClassifier.getClassifierID()) {
+ case EMBEDDED423155_CLASSIFIER_ID:
+ return Embedded423155.class;
+ case MAIN423155_CLASSIFIER_ID:
+ return Main423155.class;
+ default:
+ throw new IllegalArgumentException("The EClassifier '" + eClassifier + "' is not defined in this EPackage");
+ }
+ }
+}
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Embedded423155.java b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Embedded423155.java
new file mode 100644
index 00000000..f316fa6d
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Embedded423155.java
@@ -0,0 +1,92 @@
+package org.eclipse.emf.texo.test.model.issues.bz423155;
+
+import javax.persistence.Basic;
+import javax.persistence.Embeddable;
+import org.eclipse.emf.texo.test.model.base.identifiable.Identifiable;
+
+/**
+ * A representation of the model object '<em><b>Embedded423155</b></em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Embeddable()
+public class Embedded423155 extends Identifiable {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Basic()
+ private String name1 = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Basic()
+ private String name2 = null;
+
+ /**
+ * Returns the value of '<em><b>name1</b></em>' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the value of '<em><b>name1</b></em>' feature
+ * @generated
+ */
+ public String getName1() {
+ return name1;
+ }
+
+ /**
+ * Sets the '{@link Embedded423155#getName1() <em>name1</em>}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param newName1
+ * the new value of the '{@link Embedded423155#getName1() name1}' feature.
+ * @generated
+ */
+ public void setName1(String newName1) {
+ name1 = newName1;
+ }
+
+ /**
+ * Returns the value of '<em><b>name2</b></em>' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the value of '<em><b>name2</b></em>' feature
+ * @generated
+ */
+ public String getName2() {
+ return name2;
+ }
+
+ /**
+ * Sets the '{@link Embedded423155#getName2() <em>name2</em>}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param newName2
+ * the new value of the '{@link Embedded423155#getName2() name2}' feature.
+ * @generated
+ */
+ public void setName2(String newName2) {
+ name2 = newName2;
+ }
+
+ /**
+ * A toString method which prints the values of all EAttributes of this instance. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return "Embedded423155 " + " [name1: " + getName1() + "]" + " [name2: " + getName2() + "]" + "{extends: "
+ + super.toString() + "} ";
+ }
+}
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Main423155.java b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Main423155.java
new file mode 100644
index 00000000..d2e9feda
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/Main423155.java
@@ -0,0 +1,147 @@
+package org.eclipse.emf.texo.test.model.issues.bz423155;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.persistence.AttributeOverride;
+import javax.persistence.AttributeOverrides;
+import javax.persistence.Column;
+import javax.persistence.DiscriminatorColumn;
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.OrderColumn;
+import org.eclipse.emf.texo.test.TexoTestObjectConverter;
+import org.eclipse.emf.texo.test.TexoTestQNameConverter;
+import org.eclipse.emf.texo.test.model.base.identifiable.Identifiable;
+import org.eclipse.persistence.annotations.Converter;
+import org.eclipse.persistence.annotations.Converters;
+
+/**
+ * A representation of the model object '<em><b>Main423155</b></em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Entity(name = "Bz423155_Main423155")
+@DiscriminatorColumn(length = 255)
+@Converters({ @Converter(converterClass = TexoTestObjectConverter.class, name = "TexoTestObjectConverter"),
+ @Converter(converterClass = TexoTestQNameConverter.class, name = "TexoTestQNameConverter") })
+public class Main423155 extends Identifiable {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @ElementCollection()
+ @OrderColumn()
+ @AttributeOverrides({ @AttributeOverride(column = @Column(name = "nameOne"), name = "name1"),
+ @AttributeOverride(column = @Column(name = "nameTwo"), name = "name2") })
+ private List<Embedded423155> embedded1 = new ArrayList<Embedded423155>();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @ElementCollection()
+ @OrderColumn()
+ @AttributeOverrides({ @AttributeOverride(column = @Column(name = "nameOne"), name = "name1"),
+ @AttributeOverride(column = @Column(name = "nameTwo"), name = "name2") })
+ private List<Embedded423155> embedded2 = new ArrayList<Embedded423155>();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @ElementCollection()
+ @OrderColumn()
+ @AttributeOverrides({ @AttributeOverride(column = @Column(name = "nameOne"), name = "name1"),
+ @AttributeOverride(column = @Column(name = "nameTwo"), name = "name2") })
+ private List<Embedded423155> embedded3 = new ArrayList<Embedded423155>();
+
+ /**
+ * Returns the value of '<em><b>embedded1</b></em>' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the value of '<em><b>embedded1</b></em>' feature
+ * @generated
+ */
+ public List<Embedded423155> getEmbedded1() {
+ return embedded1;
+ }
+
+ /**
+ * Sets the '{@link Main423155#getEmbedded1() <em>embedded1</em>}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param newEmbedded1
+ * the new value of the '{@link Main423155#getEmbedded1() embedded1}' feature.
+ * @generated
+ */
+ public void setEmbedded1(List<Embedded423155> newEmbedded1) {
+ embedded1 = newEmbedded1;
+ }
+
+ /**
+ * Returns the value of '<em><b>embedded2</b></em>' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the value of '<em><b>embedded2</b></em>' feature
+ * @generated
+ */
+ public List<Embedded423155> getEmbedded2() {
+ return embedded2;
+ }
+
+ /**
+ * Sets the '{@link Main423155#getEmbedded2() <em>embedded2</em>}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param newEmbedded2
+ * the new value of the '{@link Main423155#getEmbedded2() embedded2}' feature.
+ * @generated
+ */
+ public void setEmbedded2(List<Embedded423155> newEmbedded2) {
+ embedded2 = newEmbedded2;
+ }
+
+ /**
+ * Returns the value of '<em><b>embedded3</b></em>' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the value of '<em><b>embedded3</b></em>' feature
+ * @generated
+ */
+ public List<Embedded423155> getEmbedded3() {
+ return embedded3;
+ }
+
+ /**
+ * Sets the '{@link Main423155#getEmbedded3() <em>embedded3</em>}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param newEmbedded3
+ * the new value of the '{@link Main423155#getEmbedded3() embedded3}' feature.
+ * @generated
+ */
+ public void setEmbedded3(List<Embedded423155> newEmbedded3) {
+ embedded3 = newEmbedded3;
+ }
+
+ /**
+ * A toString method which prints the values of all EAttributes of this instance. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return "Main423155 " + "{extends: " + super.toString() + "} ";
+ }
+}
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Embedded423155Dao.java b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Embedded423155Dao.java
new file mode 100644
index 00000000..0226a98c
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Embedded423155Dao.java
@@ -0,0 +1,30 @@
+package org.eclipse.emf.texo.test.model.issues.bz423155.dao;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.texo.server.store.BaseDao;
+import org.eclipse.emf.texo.test.model.issues.bz423155.Bz423155ModelPackage;
+import org.eclipse.emf.texo.test.model.issues.bz423155.Embedded423155;
+
+/**
+ * The Dao implementation for the model object '<em><b>Embedded423155</b></em>'.
+ *
+ * @generated
+ */
+public class Embedded423155Dao extends BaseDao<Embedded423155> {
+
+ /**
+ * @generated
+ */
+ @Override
+ public Class<Embedded423155> getEntityClass() {
+ return Embedded423155.class;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EClass getEClass() {
+ return Bz423155ModelPackage.INSTANCE.getEmbedded423155EClass();
+ }
+}
diff --git a/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Main423155Dao.java b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Main423155Dao.java
new file mode 100644
index 00000000..de3c8c01
--- /dev/null
+++ b/tests/org.eclipse.emf.texo.test.model/src-test-gen/org/eclipse/emf/texo/test/model/issues/bz423155/dao/Main423155Dao.java
@@ -0,0 +1,30 @@
+package org.eclipse.emf.texo.test.model.issues.bz423155.dao;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.texo.server.store.BaseDao;
+import org.eclipse.emf.texo.test.model.issues.bz423155.Bz423155ModelPackage;
+import org.eclipse.emf.texo.test.model.issues.bz423155.Main423155;
+
+/**
+ * The Dao implementation for the model object '<em><b>Main423155</b></em>'.
+ *
+ * @generated
+ */
+public class Main423155Dao extends BaseDao<Main423155> {
+
+ /**
+ * @generated
+ */
+ @Override
+ public Class<Main423155> getEntityClass() {
+ return Main423155.class;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EClass getEClass() {
+ return Bz423155ModelPackage.INSTANCE.getMain423155EClass();
+ }
+}
diff --git a/tests/org.eclipse.emf.texo.test.model/src/org/eclipse/emf/texo/test/model/TestModelPackageProvider.java b/tests/org.eclipse.emf.texo.test.model/src/org/eclipse/emf/texo/test/model/TestModelPackageProvider.java
index 0d9dfe3d..57375546 100755
--- a/tests/org.eclipse.emf.texo.test.model/src/org/eclipse/emf/texo/test/model/TestModelPackageProvider.java
+++ b/tests/org.eclipse.emf.texo.test.model/src/org/eclipse/emf/texo/test/model/TestModelPackageProvider.java
@@ -44,7 +44,9 @@ import org.eclipse.emf.texo.test.model.issues.bz403743.Bz403743ModelPackage;
import org.eclipse.emf.texo.test.model.issues.bz404132.Bz404132ModelPackage;
import org.eclipse.emf.texo.test.model.issues.bz411874.Bz411874ModelPackage;
import org.eclipse.emf.texo.test.model.issues.bz422811.Bz422811ModelPackage;
+import org.eclipse.emf.texo.test.model.issues.bz423155.Bz423155ModelPackage;
import org.eclipse.emf.texo.test.model.issues.bz423760.Bz423760ModelPackage;
+import org.eclipse.emf.texo.test.model.issues.bz424797.Bz424797ModelPackage;
import org.eclipse.emf.texo.test.model.issues.subpackage.MainModelPackage;
import org.eclipse.emf.texo.test.model.samples.accounting.AccountingModelPackage;
import org.eclipse.emf.texo.test.model.samples.capa.CapaModelPackage;
@@ -164,7 +166,9 @@ public class TestModelPackageProvider {
// result.add(Bz409157ModelPackage.INSTANCE);
result.add(Bz411874ModelPackage.INSTANCE);
result.add(Bz422811ModelPackage.INSTANCE);
+ result.add(Bz423155ModelPackage.INSTANCE);
result.add(Bz423760ModelPackage.INSTANCE);
+ result.add(Bz424797ModelPackage.INSTANCE);
// ignored as it adds the serializable class to the modelresolver
// collides with another model doing the same

Back to the top