I read the FAQ before I posted, and yes I've tried flushing the session and commiting the transaction but my object is not being saved to the database.
I'm using Hibernate3, the jTDS JDBC driver for SQL Server and M$ SQL Server.
Here's my code snippet:
// user is an object mapped via hibernate, search for said user
// works before we get to this code and we've updated the password
Session ds = GlobalData.sessionFactory.openSession();
Transaction t = ds.beginTransaction();
ds.update(user);
ds.flush();
t.commit();
Resulting object is not saved. Logs show this:
Apr 21 12:09:30 org.hibernate.SQL[DEBUG]: update kc2.dbo.users set role=?, password=?, email=?, firstName=?, lastName=?, giraffe=?, createDate=?, modifyDate=? where uuid=?
Apr 21 12:09:30 org.hibernate.jdbc.AbstractBatcher[DEBUG]: preparing statement
Apr 21 12:09:30 org.hibernate.jdbc.AbstractBatcher[DEBUG]: about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
Apr 21 12:09:30 org.hibernate.jdbc.AbstractBatcher[DEBUG]: closing statement
Apr 21 12:09:30 org.hibernate.event.def.AbstractFlushingEventListener[DEBUG]: post flush
Apr 21 12:09:30 org.hibernate.transaction.CacheSynchronization[DEBUG]: transaction before completion callback
Apr 21 12:09:30 org.hibernate.jdbc.JDBCContext[DEBUG]: before transaction completion
Apr 21 12:09:30 org.hibernate.impl.SessionImpl[DEBUG]: before transaction completion
Apr 21 12:09:30 org.hibernate.transaction.CacheSynchronization[DEBUG]: transaction after completion callback, status: 3
Apr 21 12:09:30 org.hibernate.jdbc.JDBCContext[DEBUG]: after transaction completion
Apr 21 12:09:30 org.hibernate.impl.SessionImpl[DEBUG]: after transaction completion
Apr 21 12:09:30 org.hibernate.transaction.JTATransaction[DEBUG]: Committed JTA UserTransaction
Apr 21 12:09:30 org.hibernate.impl.SessionImpl[DEBUG]: closing session
Apr 21 12:09:30 org.hibernate.jdbc.AbstractBatcher[DEBUG]: closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
|