Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Generate entity annotations in orm file(Generate orm file for eclipse link with details present on entity.)
Generate entity annotations in orm file [message #974724] Wed, 07 November 2012 09:20 Go to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
I am trying to generate ORM file and i want to have all the details present on the entity to be added to ORM file. For example: @Table, any custom annotation, relationship information etc. Is that possible directly from the EMF model? I dont want to generate ORM annotated model and then generate ORM file.

thanks,
Pradeep V.B.
Re: Generate entity annotations in orm file [message #974735 is a reply to message #974724] Wed, 07 November 2012 09:28 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Pradeep,
The orm.xml currently does not include the content of eannotations in the generation. This can be changed. So the
content of eannotations can be included as comments in the orm.xml. Can you enter a bugzilla for this with some extra
info on what type of information should be transferred from the eannotations to the orm.xml?

But.. it won't be possible to define JPA annotations in eAnnotations and then influence the orm.xml generation from
there. I mean this is a fair amount of work todo and can't be done without sponsoring/funding of this development.

gr. Martin

On 11/07/2012 10:20 AM, Pradeep Badiger wrote:
> I am trying to generate ORM file and i want to have all the details present on the entity to be added to ORM file. For
> example: @Table, any custom annotation, relationship information etc. Is that possible directly from the EMF model? I
> dont want to generate ORM annotated model and then generate ORM file.
>
> thanks,
> Pradeep V.B.


--

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
Re: Generate entity annotations in orm file [message #974761 is a reply to message #974735] Wed, 07 November 2012 09:58 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

Thanks for your quick reply on this. I will check what all we need in orm file and raise of ticket accordingly.

I agree with what you said about JPA annotations. Lets see what else we can do to get this working..

Once again thanks for your help Smile

thanks,
Pradeep V.B.

Re: Generate entity annotations in orm file [message #976145 is a reply to message #974761] Thu, 08 November 2012 10:52 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

One thing that we can do is, generate the ORM annotated file with all ORM details from the ecore model file using XML transformation (include all the possible cases) by interpreting all EAnnotations with source = texo.orm.annotation. And then use this file to generate ORM xml file. I know its a two step process, but could help a lot.

One major work is to include all scenarios.

What do you think about this approach?

thanks,
Pradeep V.B.
Re: Generate entity annotations in orm file [message #976156 is a reply to message #976145] Thu, 08 November 2012 11:00 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Pradeep,
Something your company wants to contribute you mean?
I can probably integrate this nicely so that it is one step and happens behind the scenes for a user.

Let me know if this is indeed something you want to contribute. That would be great ofcourse!

Note, that eclipse is very strict on licensing so often it is difficult to use 3rd party libraries.

And it would be great if such a xml-transformer can be somewhat generic, as I can then use it also for the code
generation annotations model.

gr. Martin

On 11/08/2012 11:52 AM, Pradeep Badiger wrote:
> Hi Martin,
>
> One thing that we can do is, generate the ORM annotated file with all ORM details from the ecore model file using XML
> transformation (include all the possible cases) by interpreting all EAnnotations with source = texo.orm.annotation. And
> then use this file to generate ORM xml file. I know its a two step process, but could help a lot.
>
> One major work is to include all scenarios.
>
> What do you think about this approach?
>
> thanks,
> Pradeep V.B.


--

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
Re: Generate entity annotations in orm file [message #977191 is a reply to message #976156] Fri, 09 November 2012 05:03 Go to previous message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

Surely would love to contribute.. But i will need time to implement it as i have other assignments.

Is is possible for you to give me an orm annotated model instance containing all possible ORM annotations in it? I will take that as a reference and create the XSL.

thanks,
Pradeep V.B.

[Updated on: Fri, 09 November 2012 05:38]

Report message to a moderator

Previous Topic:Texo on Indigo Windows 32 bit
Next Topic:[EuGENia] Issue with the generated editor
Goto Forum:
  


Current Time: Fri Apr 19 15:29:12 GMT 2024

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

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

Back to the top