Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Mechanism for updating the ecore-model and the database automatically?!
[Teneo] Mechanism for updating the ecore-model and the database automatically?! [message #77836] Sat, 31 March 2007 10:41 Go to next message
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
Hi again,

I just wondered if there is a possibility to update the ecore-model (and
therefore using a new hiber-mapping file) and to let Teneo update the
database, so that the stored objects remain valid. Of course this can only
work, if the new ecore-file and the old one are compatible (e.g. adding a
new field to an element).

My first idea was to export the datastore, make the changes manually in die
xml-file, and then import the datastore. But maybe there is another
mechanism?!

Regards,
Markus
Re: [Teneo] Mechanism for updating the ecore-model and the database automatically?! [message #77866 is a reply to message #77836] Sat, 31 March 2007 17:56 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Markus,
Both Hibernate and Jpox will automatically add new fields, tables and database constraints when
Teneo is initialized. All within a certain reasonable set of schema changes ofcourse.
Note that:
- The database schema update adds fields but does not set their default value (as far as I know). So
if you add a non-nullable field then you have to set the default value separately.
- There is an option in Teneo to disable the update of the database schema but as a default the
database schema will be updated.

gr. Martin

Markus Bischof wrote:
> Hi again,
>
> I just wondered if there is a possibility to update the ecore-model (and
> therefore using a new hiber-mapping file) and to let Teneo update the
> database, so that the stored objects remain valid. Of course this can only
> work, if the new ecore-file and the old one are compatible (e.g. adding a
> new field to an element).
>
> My first idea was to export the datastore, make the changes manually in die
> xml-file, and then import the datastore. But maybe there is another
> mechanism?!
>
> Regards,
> Markus
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: [Teneo] Mechanism for updating the ecore-model and the database automatically?! [message #604161 is a reply to message #77836] Sat, 31 March 2007 17:56 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Markus,
Both Hibernate and Jpox will automatically add new fields, tables and database constraints when
Teneo is initialized. All within a certain reasonable set of schema changes ofcourse.
Note that:
- The database schema update adds fields but does not set their default value (as far as I know). So
if you add a non-nullable field then you have to set the default value separately.
- There is an option in Teneo to disable the update of the database schema but as a default the
database schema will be updated.

gr. Martin

Markus Bischof wrote:
> Hi again,
>
> I just wondered if there is a possibility to update the ecore-model (and
> therefore using a new hiber-mapping file) and to let Teneo update the
> database, so that the stored objects remain valid. Of course this can only
> work, if the new ecore-file and the old one are compatible (e.g. adding a
> new field to an element).
>
> My first idea was to export the datastore, make the changes manually in die
> xml-file, and then import the datastore. But maybe there is another
> mechanism?!
>
> Regards,
> Markus
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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:[Teneo] Mechanism for updating the ecore-model and the database automatically?!
Next Topic:[teneo]:Newbie tutorial1 question
Goto Forum:
  


Current Time: Thu Apr 25 04:08:42 GMT 2024

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

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

Back to the top