Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [TENEO] how to read existing EPackages from DataStore?
[TENEO] how to read existing EPackages from DataStore? [message #1049966] Fri, 26 April 2013 14:18 Go to next message
oliver charlet is currently offline oliver charlet
Messages: 1
Registered: August 2012
Junior Member
Hi Martin,

I play around with teneo to evaluate it for my ideas.
I wonder, how I can read the meta model (EPackages)
from an existing Database. Until now I only found
examples how to write existing EPackages into the DB
using HBDataStore.initialize().
Is there a way to retrieve those EPackages from the
DB meta data, i.e. Table and Column definitions?
If not:
what would be the best practice to store the ecore meta model.
My use case is to persist not only the model (EObjects), but
also to persist and evolve the meta model as well.

Thanks for any hints on this.
:oliver
Re: [TENEO] how to read existing EPackages from DataStore? [message #1050103 is a reply to message #1049966] Fri, 26 April 2013 17:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5332
Registered: July 2009
Senior Member
Hi Oliver,
There are 2 ways to persist the model in the database:
1> fully schematized, then you get a table for an eclass, estructuralfeature etc
2> as blobs in a custom epackages table (you need to create this yourselve by creating a persistence ecore model with a
PersistedEPackage type which has efeatures like the nsuri, name, and a long text to store the epackage blob)

I would go for option 2, I think that's the best scalable solution. There are some technical details on how to resolve
epackages referencing eachother which are stored in different blobs in the database, but this is quite solvable.

gr. Martin

On 04/26/2013 04:49 PM, oliver charlet wrote:
> Hi Martin,
>
> I play around with teneo to evaluate it for my ideas.
> I wonder, how I can read the meta model (EPackages)
> from an existing Database. Until now I only found
> examples how to write existing EPackages into the DB
> using HBDataStore.initialize().
> Is there a way to retrieve those EPackages from the DB meta data, i.e. Table and Column definitions?
> If not:
> what would be the best practice to store the ecore meta model.
> My use case is to persist not only the model (EObjects), but
> also to persist and evolve the meta model as well.
>
> Thanks for any hints on this.
> :oliver


--

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: [TENEO] how to read existing EPackages from DataStore? [message #1050106 is a reply to message #1049966] Fri, 26 April 2013 18:01 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5332
Registered: July 2009
Senior Member
Hi Oliver,
There are 2 ways to persist the model in the database:
1> fully schematized, then you get a table for an eclass, estructuralfeature etc
2> as blobs in a custom epackages table (you need to create this yourselve by creating a persistence ecore model with a
PersistedEPackage type which has efeatures like the nsuri, name, and a long text to store the epackage blob)

I would go for option 2, I think that's the best scalable solution. There are some technical details on how to resolve
epackages referencing eachother which are stored in different blobs in the database, but this is quite solvable.

See also this:
http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Association_Mapping#Storing_references_to_Ecore_Model_Elements

gr. Martin

On 04/26/2013 04:49 PM, oliver charlet wrote:
> Hi Martin,
>
> I play around with teneo to evaluate it for my ideas.
> I wonder, how I can read the meta model (EPackages)
> from an existing Database. Until now I only found
> examples how to write existing EPackages into the DB
> using HBDataStore.initialize().
> Is there a way to retrieve those EPackages from the DB meta data, i.e. Table and Column definitions?
> If not:
> what would be the best practice to store the ecore meta model.
> My use case is to persist not only the model (EObjects), but
> also to persist and evolve the meta model as well.
>
> Thanks for any hints on this.
> :oliver


--

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:[Teneo] Problem with Audit on Teneo
Next Topic:[Teneo] DB Schema on Teneo Audit
Goto Forum:
  


Current Time: Fri Sep 19 22:15:28 GMT 2014

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

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