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 |
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 16:23 |
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 04:36 |
Martin Taal 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 |
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 04:36 |
Martin Taal 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
|
|
|
Goto Forum:
Current Time: Sat Dec 21 15:46:45 GMT 2024
Powered by FUDForum. Page generated in 0.03336 seconds
|