Home What's the best way to ensure an instance of a domain class is not changed or modified
Reply: 0

What's the best way to ensure an instance of a domain class is not changed or modified

user385
1#
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?

This is for Grails 2.2.5

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.339352 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO