> > the object is reloaded just for setting a property and discarded > > again; also, depending on how you configure your transactions, you > > could end up persisting partial non-validated changes (although I > > should say that from my observations this doesn't happen inside a > > vanilla OpenSessionInViewFilter spring setting). > > I don't really understand what you mean here I'm afraid. If you save > an object, surely you validate completely? And also, Wicket would
Please refer to my first post in this thread. My concern originates because of model changes during event handler executions. This handlers (for example the onSelectionChanged of the subject) discretely change properties of the model object without validating it as a whole (including further validation that happens inside business logic, encapsulated into services from the ui viewpoint). At first I assumed a transaction-per-request behaviour, so I was afraid that this changes could be silently persisted. Then, after I experimented a bit with OpenSessionInViewFilter, I found out that these discrete changes are ignored and never flushed to the session, because they don't occur inside a @Transactional method. So it all depends on the pattern you are using to associate sessions/txs to request. Cheers, Carlos > touch only the properties it has models/ components attached to. The > object you loaded from the store/ database is valid (or it wouldn't > have been there in the first place, right?), so the only things that > have to be validated are those extra changes. > > > I've been coding some > > examples with convoluted entity lazy-loaded associations and, despite > > my previous fears, detaching/re-attaching it from/to the hibernate > > session works like a charm. I think I will tag all my editable > > entities as Serializable and embrace this approach. > > Sounds good. Can you share a code snippet? > > Eelco > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user