Hi all. I'm new to hibernate and I need some advice from you.
I used this pattern for some OJB web applications when editing objects with forms.
1) load the object from db (using the pk)
2) change object fields using setters
3)validate the user entry (using exintake)
4) if valid, store object
5) if invalid discard changes
Now I'm trying to used hibernate for a new webapp, but the validations fails at step 3, the object with "dirty" fields goes to the UI generation. Only on the next request the "old" object is displayed.
Could you tell me which is the preferred way of doing this with hibernate?
Thanks
|