Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TEXO] javax.persistence.Temporal annotation is duplicated on generated source code
[TEXO] javax.persistence.Temporal annotation is duplicated on generated source code [message #1014823] Tue, 26 February 2013 14:33 Go to next message
Emanuele Gesuato is currently offline Emanuele GesuatoFriend
Messages: 12
Registered: December 2012
Junior Member
Hi there,

We have a very simple ecore model in which we are overriding the @Temporal annotation used for an EDate attribute.

By default, (as far as I know) texo uses the @Temporal(TemporalType.DATE) for every EDate attribute. For business purposes we tried to change the annotation with @Temporal(TemporalType.TIME).

This is our final annotated ecore model:
index.php/fa/13562/0/

But texo seems to take care to both @Temporal annotation, thus both are generated causing a compilation error:
index.php/fa/13563/0/

Are we doing something wrong ?

In model_date.zip file you could find the (very simple) model I'm using to "isolate" the error.

We are using the latest release of texo.

[Updated on: Tue, 26 February 2013 14:35]

Report message to a moderator

Re: javax.persistence.Temporal annotation is duplicated on generated source code [message #1014865 is a reply to message #1014823] Tue, 26 February 2013 16:00 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Emanuele,
The way to do this is to use a separate annotations model, this one is analyzed by Texo to prevent these double
annotations.
http://wiki.eclipse.org/Texo/ORM_JPA_Annotations_Details

btw, I am considering for the future to allow/support what you are doing, direct annotations in the model itself,
without overriding/adding duplicates. But this is some work to do..

gr. Martin

On 02/26/2013 03:33 PM, Emanuele Gesuato wrote:
> Hi there,
>
> We have a very simple ecore model in which we are overriding the @Temporal annotation used for an EDate attribute.
>
> By default, (as far as I know) texo uses the @Temporal(TemporalType.DATE) for every EDate attribute. For business purposes we tried to change the annotation with @Temporal(TemporalType.TIME).
>
> This is our final annotated ecore model:
>
>
> But texo seems to take care to both @Temporal annotation, thus both are generated causing a compilation error:
>
>
> Are we doing something wrong ?
>
> In model_date.zip file you could find the (very simple) model I'm using to "isolate" the error.
>


--

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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:Ecore Tools questions
Next Topic:[Texo] Refresh resources
Goto Forum:
  


Current Time: Thu Apr 25 08:05:12 GMT 2024

Powered by FUDForum. Page generated in 0.03259 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top