Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369931

Summary: [Texo] ORM Annotation -> Basic -> Enumerated : wrong JPA generation result
Product: [Modeling] EMFT Reporter: Benoit Cantin <cantinbe>
Component: TexoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Use case none

Description Benoit Cantin CLA 2012-01-27 09:54:56 EST
Build Identifier: Version: 3.7.0 Build id: I20110613-1736

The use case is the following. In my .ecore, I have created an EEnum called YY, and an EClass called XX, having an EAttribute ZZ of type YY.

My purpose is to generate the JPA annotated model code so that the attribute ZZ in class XX is annotated @Enumerated(EnumType.STRING).

To do that I have created a .annotationsmodel with an Annotated EClass XX, with inside an Annotated EAttribute ZZ and inside a child Basic. In this 'Basic', I set the property Enumerated to String.

The code generated is almost correct :
@Enumerated(EnumeratedType.STRING)

Except that EnumeratedType does not exists in the JPA 2 spec. It should be instead EnumType.

My Texo version is 0.1.0.v201112171308

Reproducible: Always
Comment 1 Benoit Cantin CLA 2012-01-27 09:56:04 EST
Created attachment 210186 [details]
Use case
Comment 2 Benoit Cantin CLA 2012-01-27 09:58:32 EST
Comment on attachment 210186 [details]
Use case

Attachement where (compared to the bug description) :
YY is FormulaType
XX is Formula
ZZ is Formula.formulaType
Comment 3 Martin Taal CLA 2012-01-30 04:36:40 EST
Fix committed to git, will be in next build.
Comment 4 Martin Taal CLA 2012-01-30 06:40:18 EST
Build is done and published