My use case is this: -welcome page displays a list of users, -I can click on a user and enter in detail. -in detail I can modify (add or remove items from the user) the entity. -I can save entity and come back to welcome page (user list).
I have a UserListBean as managed-bean, in conversation scope. It gets the user list from the database, and should also save the user modifications. Problems is: if I add an item to a user and I press back button on the browser my entity remains dirty, but I didn't saved the user! When a query is performed (for example when I render the welcome page) Hibernate flushes the dirty objects to the database. Clearly I don't want this behavior: if no "save button" has been pressed no modifications should be sent to the database. Seems that I need a way to say flush only when I invalidate the conversation, or when I call persist or flush manually. Do you know how to handle this situation?

