db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell B <wi...@rogers.com>
Subject Re: Reiterative development
Date Wed, 14 May 2003 15:21:20 GMT
Peter,

thanks for the reply.  I was thinking along the same lines, just needed 
to hear it from someone else.  I thought maybe there is a tool or method 
to easily alter the code and database.  I think the Apache 
ObjectRelationalBridge(OJB) has built in support to keep these items in 
sync through development.  

peter riegersperger wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Darell,
>
>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,
>
>peter
>
>
>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
>|- 
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.0.7 (GNU/Linux)
>
>iD8DBQE+wl1kIMP39JYOy9IRAh1hAJwM76hHA1EJg8og58nHFd/6gDVNHQCgweqo
>rn1RgWkh5Ew/Pc3jHvmjepM=
>=farO
>-----END PGP SIGNATURE-----
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>  
>

-- 
Darrell Bechtel,  B.G.S., MCSE

Systems Manager
Metokote Corporation of Canada
1011 HomerWatson Blvd.
Kitchener, Ontario
Ph: (519)669-0559
Fax:(519)669-3635
http://www.metokote.com




Mime
View raw message