Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF and JPA(EMF editor, JPA)
icon5.gif  EMF and JPA [message #756591] Mon, 14 November 2011 13:03 Go to next message
Mike  is currently offline Mike Friend
Messages: 1
Registered: November 2011
Junior Member
Hi

I created an emf project, generated the editor code and filled my model with data -> via test.editor (My project is called "test" so I've got an test.edit, test.editor, test.tests). The data are stored in an xml file. Now I would like to read the data via JPA. Does anyone know how my persistence.xml should look like?

My data xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<sa:Library xmi:version="2.0" xmlns:xmi="..." xmlns:sa="...">
  <RefLibBook Pages="10" Name="BookA"/>
  <RefLibBook Pages="20" Name="BookB"/>
</sa:Library>



Thanks
Re: EMF and JPA [message #756596 is a reply to message #756591] Mon, 14 November 2011 13:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Mike,

You'll want to have a look at the Teneo project.

On 14/11/2011 2:03 PM, Mike wrote:
> Hi
>
> I created an emf project, generated the editor code and filled my
> model with data -> via test.editor (My project is called "test" so
> I've got an test.edit, test.editor, test.tests). The data are stored
> in an xml file. Now I would like to read the data via JPA. Does anyone
> know how my persistence.xml should look like?
>
> My data xml looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <sa:Library xmi:version="2.0" xmlns:xmi="..." xmlns:sa="...">
> <RefLibBook Pages="10" Name="BookA"/>
> <RefLibBook Pages="20" Name="BookB"/>
> </sa:Library>
>
>
> Thanks


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF and JPA [message #756614 is a reply to message #756596] Mon, 14 November 2011 14:14 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Or the Texo project (but that's not for rcp's directly):
http://martintaal.wordpress.com/2011/10/26/texo-generate-jpa-annotated-pojos-from-ecorexsd/

gr. Martin

On 11/14/2011 02:20 PM, Ed Merks wrote:
> Mike,
>
> You'll want to have a look at the Teneo project.
>
> On 14/11/2011 2:03 PM, Mike wrote:
>> Hi
>>
>> I created an emf project, generated the editor code and filled my model with data -> via test.editor (My project is
>> called "test" so I've got an test.edit, test.editor, test.tests). The data are stored in an xml file. Now I would like
>> to read the data via JPA. Does anyone know how my persistence.xml should look like?
>>
>> My data xml looks like this:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sa:Library xmi:version="2.0" xmlns:xmi="..." xmlns:sa="...">
>> <RefLibBook Pages="10" Name="BookA"/>
>> <RefLibBook Pages="20" Name="BookB"/>
>> </sa:Library>
>>
>>
>> Thanks


--

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
Previous Topic:[EMF] Inheritance across two ecore-files
Next Topic:Using EMF generated codes in external java codes
Goto Forum:
  


Current Time: Thu Apr 25 08:18:48 GMT 2024

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

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

Back to the top