db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Lin" <Howard....@vonage.com>
Subject RE: Upgrade Script
Date Fri, 07 Mar 2003 23:20:48 GMT
When schema changes, you need to re-generate BaseXXX and BaseXXXPeer classes (of course). Torque
will not overwrite your existing XXX and XXXPeer code, so you only need to do some necessary
changes (like removing set/get calls to no-existing fields and use set/get for new added fields).
Torque make code changes to a minimum when schema changes. This is what I like most.

Howard Lin 

> -----Original Message-----
> From: Dan Allen [mailto:dan@mojavelinux.com]
> Sent: Friday, March 07, 2003 5:08 PM
> To: torque-user@db.apache.org
> Subject: Re: Upgrade Script
> 
> 
> Let's back up for a second on this question.  The original question
> was, how would one issue changes the the database between two schema
> files.  I admit that a request like that would be complex indeed and
> probably better done using a home-grown script.
> 
> However...
> 
> What about the changes to the BasePeer and BaseModel classes.  The
> docs say that these classes are created if they do not exist, but
> what happens when you add or remove a column in a table.  Surely
> they would have to be generated again to update the methods and
> properties to include the changes.  What are the best practices to
> follow after making a table change regarding the classes?
> 
> Dan
> 
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Daniel Allen, <dan@mojavelinux.com>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> "I used to herd dairy cows.  Now I herd linux users.  Apart 
> from the isolation, I think I preferred the cows.  They were 
> better in conversation, easier to milk, and if they annoyed me 
> enough, I could shoot them and eat them."
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 

Mime
View raw message