Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.1.3
Hi, I have a question of principle about hibernate. Currently i do some tests with JSF/Spring/Hibernate The JSF use a Bean which use a Spring object (service) which is using an hibernate object mapping (POJO). If i do like that, in fact i play with hibernate model object at the JSF Bean level -> i have some problems (when i update the values at the JSF level -> i update the value in the Bean ... BUT when i save the data, the data to be saved is sometime the new value but also some time the old value !!!!! - it is like first i update the value to save but at the time of saving, the new updated value is replaced by the old one from the db).
The problem disappears if i use a Transfert Object (Value Object - TO) which is exactly the same as my hibernate POJO. I map one for one. So now, i have MyTo myTo = new MyTo(myHibernatePojo); and i work with that TO object.
My question is : Do i have to work like that or did i miss something somewhere ?
Another question is: Do i have to create the TO in the DAOImpl or do i have to create it in the BO (Business Object) ?
Thanks and sorry for my poor english