Hibernate saveorupdate is not updating
Update() or Lock() to re-associate the object with the session. In all of the above cases, you may still need to call Flush().Flush() basically synchronize the session with the database.Subscriber.unsubscribed Publications#4f2252b203194e5a0103195114600001]@4000000042546b350354515c ,053 DEBUG Session Impl:2984 - uninitialized collection: [email protected] ,055 DEBUG Loader:197 - processing result [email protected] ,057 DEBUG Loader:405 - result row:@4000000042546b3503adcf84 ,059 DEBUG String Type:68 - returning '4f2252b203194e5a0103195114600001' as column: [email protected] ,061 DEBUG Loader:292 - found row of collection: [com.wrinkledog.phydeaux.model.Subscriber.unsubscribed Publications#4f2252b203194e5a0103195114600001]@4000000042546b3503e60624 ,062 DEBUG Session Impl:3007 - reading [email protected] ,064 DEBUG Long Type:68 - returning '4' as column: [email protected] ,067 DEBUG Session Impl:1950 - loading [com.wrinkledog.phydeaux.model.So far I had been using Save Or Update most of the time, but I am worried it is wrong. I'm using NH in a web application and I was wondering if doing a single Flush just at the end of the page processing would be sufficient or there would be situations where it would cause a problem? I am trying to improve the performance of my stuff and I'd like to learn some best practices at the same time. the object is not associated with the session anymore.That means it one of three things: the object has been loaded from a different session; you have cleared the session; or you have evicted the object from the session. Use Save Or Update() if you don't know if the object is new or not.
One version takes a class object and will load the state into a newly instantiated object.Publication#4]@4000000042546b3504681aec ,068 DEBUG Loader:405 - result row:@4000000042546b3504add67c ,073 DEBUG String Type:68 - returning '4f2252b203194e5a0103195114600001' as column: [email protected] ,628 DEBUG Session Impl:1363 - save Or Update() previously saved instance with id: [email protected] ,630 DEBUG Session Impl:1411 - updating [com.wrinkledog.phydeaux.model.Publication#4]@4000000042546b35272e634c "file:/Volumes/data1/wd/projects/LPEA/phydeaux/dev/webapp/modules/fido/flow.js", line 38: uncaught Java Script exception:@4000000042546b35272e7ea4 at subscribe (file:/Volumes/data1/wd/projects/LPEA/phydeaux/dev/webapp/modules/fido/flow.js, Line 38):@4000000042546b35272e8e44 [email protected] Hibernate: select unsubscrib0_.publication_id as publicat2___, unsubscrib0_.subscriber_id as subscrib1___ from optout unsubscrib0_ where [email protected] ,046 DEBUG Batcher Impl:241 - preparing [email protected] ,048 DEBUG String Type:46 - binding '4f2252b203194e5a0103195114600001' to parameter: [email protected] ,051 DEBUG Loader:327 - result set contains (possibly empty) collection: [com.wrinkledog.phydeaux.model.