Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Need to update application schema, Please help.
Need to update application schema, Please help. [message #74904] Sun, 27 July 2008 05:01 Go to next message
Eclipse User
Originally posted by: kalkar.prashant.gmail.com

Hi,

I am using XML Schema, EMF, Teneo and hibernate for managing the
application persistent layer.

I am new to these technologies.
Currently the code for the persistent layer is already generated from
the XML Schema (XML Schema -> Ecore -> Model) and Teneo is used for
integrating with Hibernate.

Now I need to modify the current schema, need to add some new fields in
the existing tables and need to add some new tables.

I can update these changes in the XML Schema (XSD file). But I don't
know how to generate the corresponding Ecore file from the updated xsd
file, or is there any other way of doing this.

Can someone please help me.

Regards,
Prashant
Re: Need to update application schema, Please help. [message #74918 is a reply to message #74904] Sun, 27 July 2008 12:23 Go to previous messageGo to next message
Marcelo Paternostro is currently offline Marcelo Paternostro
Messages: 602
Registered: July 2009
Senior Member
Hi,

You need to right click the .genmodel and hit "Reload...".

Cheers,
Marcelo

Prashant Kalkar wrote:
> Hi,
>
> I am using XML Schema, EMF, Teneo and hibernate for managing the
> application persistent layer.
>
> I am new to these technologies.
> Currently the code for the persistent layer is already generated from
> the XML Schema (XML Schema -> Ecore -> Model) and Teneo is used for
> integrating with Hibernate.
>
> Now I need to modify the current schema, need to add some new fields
> in the existing tables and need to add some new tables.
>
> I can update these changes in the XML Schema (XSD file). But I don't
> know how to generate the corresponding Ecore file from the updated xsd
> file, or is there any other way of doing this.
>
> Can someone please help me.
>
> Regards,
> Prashant
Re: Need to update application schema, Please help. [message #74929 is a reply to message #74904] Mon, 28 July 2008 00:36 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5326
Registered: July 2009
Senior Member
Hi Prashant,
If you right-click on the genmodel and choose reload then you can reload the xsd into the genmodel.
After reloading, regenerate the java classes (right-click on the epackage in the genmodel). Teneo
picks up the new ecore model automatically and will create a new mapping, hibernate will then update
the database (depends on the hbm2ddl setting). Note that hibernate in update mode add columns and
tables but does not add indexes.

gr. Martin

Prashant Kalkar wrote:
> Hi,
>
> I am using XML Schema, EMF, Teneo and hibernate for managing the
> application persistent layer.
>
> I am new to these technologies.
> Currently the code for the persistent layer is already generated from
> the XML Schema (XML Schema -> Ecore -> Model) and Teneo is used for
> integrating with Hibernate.
>
> Now I need to modify the current schema, need to add some new fields in
> the existing tables and need to add some new tables.
>
> I can update these changes in the XML Schema (XSD file). But I don't
> know how to generate the corresponding Ecore file from the updated xsd
> file, or is there any other way of doing this.
>
> Can someone please help me.
>
> Regards,
> Prashant


--

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
Re: Need to update application schema, Please help. [message #603151 is a reply to message #74904] Sun, 27 July 2008 12:23 Go to previous message
Marcelo Paternostro is currently offline Marcelo Paternostro
Messages: 602
Registered: July 2009
Senior Member
Hi,

You need to right click the .genmodel and hit "Reload...".

Cheers,
Marcelo

Prashant Kalkar wrote:
> Hi,
>
> I am using XML Schema, EMF, Teneo and hibernate for managing the
> application persistent layer.
>
> I am new to these technologies.
> Currently the code for the persistent layer is already generated from
> the XML Schema (XML Schema -> Ecore -> Model) and Teneo is used for
> integrating with Hibernate.
>
> Now I need to modify the current schema, need to add some new fields
> in the existing tables and need to add some new tables.
>
> I can update these changes in the XML Schema (XSD file). But I don't
> know how to generate the corresponding Ecore file from the updated xsd
> file, or is there any other way of doing this.
>
> Can someone please help me.
>
> Regards,
> Prashant
Re: Need to update application schema, Please help. [message #603154 is a reply to message #74904] Mon, 28 July 2008 00:36 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5326
Registered: July 2009
Senior Member
Hi Prashant,
If you right-click on the genmodel and choose reload then you can reload the xsd into the genmodel.
After reloading, regenerate the java classes (right-click on the epackage in the genmodel). Teneo
picks up the new ecore model automatically and will create a new mapping, hibernate will then update
the database (depends on the hbm2ddl setting). Note that hibernate in update mode add columns and
tables but does not add indexes.

gr. Martin

Prashant Kalkar wrote:
> Hi,
>
> I am using XML Schema, EMF, Teneo and hibernate for managing the
> application persistent layer.
>
> I am new to these technologies.
> Currently the code for the persistent layer is already generated from
> the XML Schema (XML Schema -> Ecore -> Model) and Teneo is used for
> integrating with Hibernate.
>
> Now I need to modify the current schema, need to add some new fields in
> the existing tables and need to add some new tables.
>
> I can update these changes in the XML Schema (XSD file). But I don't
> know how to generate the corresponding Ecore file from the updated xsd
> file, or is there any other way of doing this.
>
> Can someone please help me.
>
> Regards,
> Prashant


--

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:Need to update application schema, Please help.
Next Topic:XSD to Ecore order attributes
Goto Forum:
  


Current Time: Wed Jul 23 16:25:42 EDT 2014

Powered by FUDForum. Page generated in 0.17730 seconds