Im using Hibernate for my CRUD web app, and want to find out how do people usualy use Hibernate for web *update* process?
Maybe you read Hibernate In Action book, and there are presented 3 ways of doing this :
1. Storing object ID as hidden form field, thus being forced to load this object upon submit before populating it with new values (most simple but not performant)
2. Storing it in a HttpSession, and reattaching it later (HttpSession is best avoided in web development due to back-button effect, and performance in clusters; also complicating code with Session.lock() calls)
3. Keeping Session open during multiple request? (fancy ServletFilter usage)
Also, if one prefers 2. or 3. solution, where do you place removal of detached object from HttpSession (user can press back button and go somewhere else, without submitting form, and your object is still in HttpSession)?