Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2007-04-22 20:57:01 +0000
committermtaal2007-04-22 20:57:01 +0000
commitb923dc6d08de8a1df0de3a610148244ac59bf3f9 (patch)
treed16e4112591b32527e298e131c8ad698114cf8fa
parent152a55c4f775754bfa81c50d665d3acdb2837546 (diff)
downloadorg.eclipse.emf.teneo-b923dc6d08de8a1df0de3a610148244ac59bf3f9.tar.gz
org.eclipse.emf.teneo-b923dc6d08de8a1df0de3a610148244ac59bf3f9.tar.xz
org.eclipse.emf.teneo-b923dc6d08de8a1df0de3a610148244ac59bf3f9.zip
-rw-r--r--plugins/org.eclipse.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotator.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotator.java b/plugins/org.eclipse.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotator.java
index 686af8be6..3125fa685 100644
--- a/plugins/org.eclipse.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotator.java
+++ b/plugins/org.eclipse.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotator.java
@@ -11,7 +11,7 @@
* Martin Taal
* </copyright>
*
- * $Id: DefaultAnnotator.java,v 1.25.2.9 2007/03/30 15:39:09 mtaal Exp $
+ * $Id: DefaultAnnotator.java,v 1.25.2.10 2007/04/22 20:57:01 mtaal Exp $
*/
package org.eclipse.emf.teneo.annotations.mapper;
@@ -82,7 +82,7 @@ import org.eclipse.emf.teneo.util.StoreUtil;
* information. It sets the default annotations according to the ejb3 spec.
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.25.2.9 $
+ * @version $Revision: 1.25.2.10 $
*/
public class DefaultAnnotator {
@@ -680,6 +680,15 @@ public class DefaultAnnotator {
log.debug("EAttribute " + logStr + " needs a onetomany");
final EAttribute eAttribute = (EAttribute) aAttribute.getAnnotatedElement();
+
+ // there can be many enums
+ if (eAttribute.getEType() instanceof EEnum && aAttribute.getEnumerated() == null) {
+ final Enumerated enumerated = aFactory.createEnumerated();
+ enumerated.setValue(EnumType.STRING_LITERAL);
+ enumerated.setEModelElement(eAttribute);
+ aAttribute.setEnumerated(enumerated);
+ }
+
OneToMany otm = aAttribute.getOneToMany();
final boolean otmWasSet = otm != null; // otm was set manually
if (otm == null) {

Back to the top