-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Setting the Database (O/R) fieds by using hibernate and java
PostPosted: Sat Apr 29, 2006 11:48 am 
Newbie

Joined: Fri Apr 07, 2006 3:43 pm
Posts: 14
Guys,

I need to set the Database fields in my local scheme through hibernate session, by using java.

Here is the code, I am using to setup the field called carId

public void setCarId(Car theCar){
createDBSession();
Transaction tx1 = carSession.beginTransaction();
CarDetails carDetails=new CarDetails();
CarPrice carPrice = null;
try{
carPrice=carDetails.getCar(theCar.getCarNameCode(), null);
long carId=carPrice.getCarId();
theCar.setCarId(carId);
}
catch (CarException ce) {
log.debug(ce);
}
}
carSession.saveOrUpdate(theCar);
tx1.commit();
closeDBSession();
}

But, the field(carId) in my database is not displaying its value (whose original value is present in OracleDB), the value of the carId field is coming from OracleDB, which i replicated in my SybaseDb
Thks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.