Optimistic locking strategy in Grails

In Grails optimistic locking is achieved by version property . The Grails Domain classes has a built in property called “version”. This property can be used for optimistic locking. Although you can remove this property static mapping ={ version false … Continue reading

Alphanumeric Sorting using Criteria Query (with MySQL database)

I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field … Continue reading

Grails:Domain Design Via Intellij Idea’s Diagrams

Here is an example of how to design Grails domain class with Intellij Idea.For this we need to have blank domain classes. So lets say we created  three Domain Classes Company,Book,Author To see relationship diagram, Selected Domain Class, and selected tab … Continue reading

Inject custom validation errors in object

Reading the grails docs is like my habit, they always enhances your learning. Today I was going through the grails docs again and I found a very good way of showing some custom error messages. As I saw it I … Continue reading