What's the best way to ensure an instance of a domain class is not changed or modified
user385 Published in June 19, 2018, 2:32 pm
When I retrieve a domain instance via GORM, there is the possible danger of code modifying that instance/row. Especially because Grails automatically saves it even without calling .save() on the instance.
The only way I've ensured this before is making sure I call discard() on the instance in the past. Is there a better way?