I found something strange in Grails.
I create an object like:
User a = new User()
a.setName("test")
a.save()
after that I call a Method e.g. setActive like:
a.setActive(true)
and DON’T call save() but it is saved in the database. I don’t know why?! I think this is dangerous. Any suggestions on this?
Thanks a lot,
Marco
After execution of service methods (in case of transactional = true) grails save all changes with domain/persist objects and flush hibernate session.
The same behaviour of Redirect in controller action.
To rollback changes – throw RuntimeException.