db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter riegersperger <r...@subnet.at>
Subject Re: Reiterative development
Date Wed, 14 May 2003 15:14:43 GMT
Hash: SHA1


changing the schema while developing a project works well. i found it to be 
most practical to do the following:

modify your schema
create the database creation statements with the ant task "sql"
create the new persistence layer with the ant task "om"
note that this task will overwrite all Base* classes in your package, but not 
any other class.

then, use a mysql client to change your database. you can copy paste (most of) 
the create statements from the script, just change CREATE to ALTER. in most 
cases, this is enough.

doing this saves all your data, and all changes to your persistence layer.

hope that helps,


On Wednesday 14 May 2003 16:55, Darrell B wrote:
> Hi,
> I am a new user of torque and have successfully built the java classes
> and mysql database from the pre built sql statements, but my concern is
> the changing of the schema or data model as my project evolves.  My
> question is: what is the best way to modify the model so the database
> and java classes are in sync?  Should I make modifications to the xml
> schema file and regenerate the java classes and rebuild the database
> each time?  And will this make additions to the database, and java
> classes or erase all current work by overwriting the files or dropping
> the database tables?
> thanks,
> Darrell

- -- 
| peter riegersperger  <rick@subnet.at>
| subnet
| platform for media art and experimental technologies
| http://www.subnet.at/
| muehlbacherhofweg 5 // 5020 salzburg // austria
| fon/fax +43/662/842 897
Version: GnuPG v1.0.7 (GNU/Linux)


View raw message