Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [TENEO] Load Read-only database into XMI
[TENEO] Load Read-only database into XMI [message #1014839] Tue, 26 February 2013 10:09 Go to next message
joaquin rgu is currently offline joaquin rgu
Messages: 2
Registered: February 2013
Junior Member
Hello everyone,

I am starting to use EMF, learning, and I was wondering if it was possible to use Teneo to load a database into an XMI file.
So far, I have created an ecore model from a uml file (obtained by reverse engineering the database), and I have been able to load the contents of the database into an emf resource. However I see that my project only works with hbm2ddl.auto=update, and columns e_id and dtype are created for each table. My database should be read-only, is it possible to read all the database into the resource without creating additional fields?

Thank you!!
Re: [TENEO] Load Read-only database into XMI [message #1014862 is a reply to message #1014839] Tue, 26 February 2013 10:58 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5326
Registered: July 2009
Senior Member
Hi Joaquin,
To accomplish this you have to ensure that the model-rdb mapping is inline with your database schema. You can do this
using annotations in the model (to set column names for example). You can prevent several of these auto-column creations
usings options:
http://wiki.eclipse.org/Teneo/Hibernate/Configuration_Options

For example:
teneo.mapping.always_version (set to false)
teneo.mapping.disable_econtainer (set to true)

But doing manual mapping requires a good understanding how hibernate/ORM's map to a RDB.

gr. Martin

On 02/26/2013 04:46 PM, joaquin rgu wrote:
> Hello everyone,
>
> I am starting to use EMF, learning, and I was wondering if it was possible to use Teneo to load a database into an XMI
> file.
> So far, I have created an ecore model from a uml file (obtained by reverse engineering the database), and I have been
> able to load the contents of the database into an emf resource. However I see that my project only works with
> hbm2ddl.auto=update, and columns e_id and dtype are created for each table. My database should be read-only, is it
> possible to read all the database into the resource without creating additional fields?
>
> Thank you!!


--

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] Load Read-only database into XMI [message #1014903 is a reply to message #1014862] Tue, 26 February 2013 12:37 Go to previous message
joaquin rgu is currently offline joaquin rgu
Messages: 2
Registered: February 2013
Junior Member
Thanks for your quick answer Martin,

I am going to take a look at the manual mapping.
Previous Topic:[CDO]Net4J Oracle Adaptor - schema generation exception
Next Topic:Cross referencing model
Goto Forum:
  


Current Time: Fri Aug 01 06:03:32 EDT 2014

Powered by FUDForum. Page generated in 0.02079 seconds