Only Read and Insert In Domain Class
In my recent Project, I wanted to create a domain class in which records could only be added and read and no update was to be allowed on any of the records and I found a very nice way of doing it. Adding
[java]
static mapping = {
cache usage: ‘read-only’
version false
}
[/java]
in the domain class did the trick for me and now, in this domain only read and create is possible. No updates and deletes. 🙂
With Regards
Sachin Anand
Enjoyed every bit of your blog article.Really thank you! Much obliged.
I truly appreciate this article.Much thanks again. Really Great.
Major thanks for the post.Much thanks again. Awesome.