[Teneo] Mechanism for updating the ecore-model and the database automatically?! [message #77836] |
Sat, 31 March 2007 06:41  |
Eclipse User |
|
|
|
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 13:56  |
Eclipse User |
|
|
|
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 13:56  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04917 seconds