Hi,
I am finding that when I execute my code one way, Hibernate works fine. But when I execute it slightly differently, Hibernate will never execute any insert SQLs. I'll try and explain ....
I should probably make it clear up front that I am using the Spring framework, and it could be something at this level causing the problem.
Now, when I execute my business method, as part of a unit test, part of the execution of that method calls Session.merge() and my object is persisted. Everything works as expected.
But, when that same method is executed as a result of a Spring Quartz job (Quartz is a scheduling framework), the call to Session.merge() does not result in any INSERT statements being executed. I have turned on SQL logging and can see that SELECT statements are executed, but no insert statements.
Session.merge() does not throw any exceptions, and a call to Session.flush() immediatly after merge() has no effect.
Any suggestions on what I can look at to try and get this working?
Thanks
robin
Hibernate version: 3.2.4.sp1
Name and version of the database you are using: Oracle 10
|