TO THE NEW Blog PAGES

Grails

Grails 2.0 action arguments data binding

One feature that I really like in Grails 2.0 is action arguments databinding. While reading more about it I also found a nice grails.web.RequestParameter annotation. When you know something you always find its use case. In my recent project I need to take radius and height as params for creating a cylinder so my action […]

Grails

Using aliases in aggregate functions of criteria queries

When using criteria queries, many times we encounter a use case where we need to order our result not on any field of domain class but on our result set, in these cases aliases can be used. In my project, use case was to find most liked products from the domain: [java] ProductStat{ Date dateCreated […]

Puneet Behl
Puneet Behl
Read

Grails

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 empId then on doing : [plain] Employee e1 = new Employee(empId:’emp10′).save() Employee e2 = new […]

Gaurav Sharma
Gaurav Sharma
Read
Services