Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Need to update application schema, Please help.
Need to update application schema, Please help. [message #74904] Sun, 27 July 2008 09:01 Go to next message
Eclipse UserFriend
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 16:23 Go to previous messageGo to next message
Marcelo Paternostro is currently offline Marcelo PaternostroFriend
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 04:36 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
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 16:23 Go to previous message
Marcelo Paternostro is currently offline Marcelo PaternostroFriend
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 04:36 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
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: Sat Apr 20 05:54:05 GMT 2024

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

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

Back to the top