Joined: Mon Feb 14, 2005 12:14 am Posts: 14 Location: Boston, USA
|
Hibernate version:2.1.7
Mapping documents: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration> <session-factory> <!-- properties --> <property name="connection.datasource"> phoenixAppDS </property> <property name="dialect"> net.sf.hibernate.dialect.Oracle9Dialect </property> <property name="show_sql">true</property> <property name="transaction.factory_class"> net.sf.hibernate.transaction.JTATransactionFactory </property> <property name="hibernate.transaction.manager_lookup_class"> net.sf.hibernate.transaction.WebSphereTransactionManagerLookup </property>
<!-- mapping files --> <mapping resource="UserProfile.hbm.xml"/> <mapping resource="ClientTypeL1.hbm.xml"/> </session-factory> </hibernate-configuration>
Code between sessionFactory.openSession() and session.close(): session.save((ClientTypeL1)orRefData);
Full stack trace of any exception that occurs:
Name and version of the database you are using:Oracle 9i
The generated SQL (show_sql=true):I am not getting the insert sql statement
Hi,
I have an application which uses CMTs. So while saving my entity to the database , i am not starting a trasanction. I don't have any transaction specific code. But i am not able to save my entity to the database. I have read in one of the FAQs that "Hibernate will not execute any SQL until you either call Transaction.commit() (if using the Transaction API) or Session.flush() (if you are not) at the end of a session to flush your in-memory changes to the database." Since i am using CMT, i am not manually committing my transaction. Can somebody help me in this regard. I am using WebSphere 5.0 application server.
Thanks.
|
|