I'm having the same problem (I think). I have this code
Code:
TrackingStep rootTracking = (TrackingStep)session.load(
TrackingStep.class, rootTrackingID, LockMode.READ);
When I run the application, it generates this in the logs.
Code:
Locking entity: [com.idex.processtracking.bean.TrackingStep#21]
about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
select id from TrackingSteps where id =?
preparing statement
binding '21' to parameter: 1
about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
closing statement
resolved object in session cache: [com.idex.processtracking.bean.TrackingStep#21]
It seems that, for some reason, it's refreshing the ID, but gets the rest of the object from session cache. Does anyone know why this is happening?
Thanks,
Connor