Hi everybody,
i 've got the following configuration properties in mycfg.xml. When i persist an object to the database i expect to see some sql output in my console? Is that a correct expectation?
Code:
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
What i am trying is to see why my code does not insert a new record to the database (Oracle 9i).
Code:
public void persist(Rqs transientInstance) {
log.debug("persisting Rqs instance");
/**
* ToDo
*/
log.setLevel(Level.DEBUG);
Transaction tx = null;
try {
tx = getCurrentSession().beginTransaction();
getCurrentSession().save(transientInstance);//persist(transientInstance);
tx.commit();
log.debug("persist successful");
} catch (RuntimeException re) {
log.error("persist failed", re);
if(tx != null)
tx.rollback();
throw re;
}
finally{
getCurrentSession().close();
}
}
Regards,
ak