[FIXED][Texo] ORM Annotation -> Basic -> Enumerated : wrong JPA generation result [message #784337] |
Fri, 27 January 2012 11:25 |
Benoit Cantin Messages: 34 Registered: January 2012 |
Member |
|
|
Hello all,
First of all, thanks for the great tool that is Texo.
My problem is that JPA code generation result in a compile error.
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.
Is there something I'am missing ?
[Updated on: Mon, 13 February 2012 12:38] Report message to a moderator
|
|
|
Re: [Texo] ORM Annotation -> Basic -> Enumerated : wrong JPA generation result [message #784442 is a reply to message #784337] |
Fri, 27 January 2012 14:35 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Benoit,
This seems to be a bug, can you enter a bugzilla with the ecore attached? Then I will solve it shortly.
gr. Martin
On 01/27/2012 12:25 PM, Benoit Cantin wrote:
> Hello all,
>
> First of all, thanks for the great tool that is Texo.
>
> My problem is that JPA code generation result in a compile error.
>
> 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.
>
> Is there something I'am missing ?
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02240 seconds