on 12/19/2000 1:35 PM, "Colin Chalmers" <[EMAIL PROTECTED]> wrote:

> 
> 1. For inserting a new user I used this code.
> 
> Criteria newdata = new Criteria();
> newdata.add(TurbineUserPeer.getColumnName("LOGIN_NAME"), "collie");
> newdata.add(TurbineUserPeer.getColumnName("PASSWORD_VALUE"),
> "password");
> newdata.add(TurbineUserPeer.getColumnName("FIRST_NAME"), "colin");
> 
> int visitor_id = -1;
> 
> visitor_id =
> ((BigDecimal)TurbineUserPeer.doInsert(newdata)).intValue();
> 
> which does work!!! But do I always have to use the ColumnName? Or is there a
> simplier way?

The method names may not be 100% accurate, but this should give you the
right idea...

TurbineUser user = new TurbineUser();
user.setLoginName("collie");
user.setPassword("password");
user.setFirstName("colin");
TurbineUserPeer.doInsert(user);

> 2. After my success at that end I thought it would be the same for adding a
> JobEntry, but the JobEntryPeer doesn't have the getColumnName method.

This code probably needs to be redone since I'm not sure how old it is, but
try it with the above methodology and I think you should be able to do it.

thanks,

-jon

-- 
Honk if you love peace and quiet.




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to