Grails save changes in domain classes even on failed validation

D

dead_rat

Guest
We are trying to update Domain object.
I want to set params to Object and validate it, on success validation save it, on fail - render it on page without saving.
But when I change object's fields and pass it to render, Grails saves it, even if I reject some value of object.
Seteeting Hibernate property flush.mode = 'commit' didn't help.
Question is how to prevent saving object unless I call .save()?
 

dave

Administrator
Staff member
Are you absolutely certain it is being persisted to the database and not just showing the in memory version of your domain object containing the errors in your view?
 
Top