I need to do some custom JDBC code after I call save on an object (since I'm implementing my own type of lazy load).
I'm within a session bean transaction.
I then call session.save(obj);
After that call, I then use the session.connection() to execute some update statements using JDBC. The updates update fields of the table that obj is mapped to.
Once the transaction completes, I see the SQL log from Hibernate, but my custom JDBC statements are not being sent! I've put my own logging to make sure my JDBC code is being executed, and it is.
I've doing a connection commit and a session close after my custom statements, but that just causes errors.
Why would Hibernate ignore my statements? Any ideas on how to force my SQL to be executed?
|