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: updating a record
Date Fri, 07 Mar 2003 23:49:24 GMT
Since no explicit constructor for User or BaseUser created by Torque, the "key" field will
be whatever default is. You can define a constructor for User(int, stiring, ...) so you can
do all your initialization there.

Howard Lin

> -----Original Message-----
> From: Dan Allen [mailto:dan@mojavelinux.com]
> Sent: Friday, March 07, 2003 4:19 PM
> To: Turbine Torque Users List
> Subject: Re: updating a record
> 
> 
> > > > User user = new User();
> > > > data.getParameters().setProperties(user); // much easier
> One more question, do I have to hit all the properties or can I skip
> some of them to leave them as is.  For instance, if I had fields:
> 
> user_id
> username
> password
> key
> 
> and I did
> 
> User user = new User();
> user.setUserId(3);
> user.setUsername("foo");
> user.setPassword("bar");
> user.setNew(false);
> user.save();
> 
> Will it automatically leave the "key" field as is?  If that is the
> case, I am cookin' with gas!
> 
> Dan
> 
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Daniel Allen, <dan@mojavelinux.com>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> "I'm old enough to know better, but still too young to care."
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 
> ---------------------------------------------------------------------
> 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