Popular Tags:

Grails – query or criteria against a string/value pairs map property

abril 21, 2014 at 10:35

Grails gives the possibility of creating simple key/value map properties as a Map of String to String, but the documentation doesn’t show how to query by this type of properties.

This post illustrates how to query the domain class using the map property as part of the query (i.e adding a condition for the key X to have the value Y) using HQL.

Grails – my domain class instance says its class is abstract!

noviembre 18, 2013 at 09:56

Solution to the Grails problem when a domain class claims to have an abstract class as an effective class (i.e using getClass() and domainClass.class returns an abstract class) by removing the Hibernate proxy of that certain instance

Temacos traducidos: John Mayer – Stop This Train

agosto 8, 2013 at 15:06

Aunque en Europa no es especialmente conocido (al menos que yo sepa, igual es sólo en España o que yo vivo en una burbuja, que también puede ser ), John Mayer parece que es toda una celebridad en USA. Yo, para variar, lo conocí por recomendación de mi hermano (que, […]

Grails – Quickly examine a domain class associations

julio 30, 2013 at 09:00

When your Grails model gets a bit complex, you may find yourself with conflicts in your domain classes associations (I like some parts of GORM, such as dynamic finders, but I think the relationships stuff could be improved). In my case, I usually end up finding problems when I mix […]

Groovy – Simplest way of resolving a nested property

julio 24, 2013 at 09:00

So let’s say that in Groovy you find yourself wanting to do something like this: [ 'name', 'lastName', 'address.street'].collect { propertyToResolve -> [(propertyToResolve): user[property] } You will find that the automatic getter (using it with the map syntax or as a property doesn’t change anything) won’t parse the argument to […]

Grails – publish a plugin in a self-hosted maven repository

junio 10, 2013 at 10:08

Introduction and usage example of Grails Plugin Maven Deployer, a small scripting tool I created. The tool allows you to publish a plugin in a self-hosted maven repo by packaging it as a JAR file.

New Grails plugin – Timestamped

junio 3, 2013 at 09:46

A Grails plugin to inject the auto-timestamp properties using a configurable, joda-time compatible AST transform that can be used both by a project and by other plugins.

Grails – small and simple method to convert objects to JSON

enero 12, 2013 at 11:03

I was playing around with Grails and JSON and came up with a small method to convert a given collection of objects into JSON (typically, domain class objects, but it would work with anything). It’s nothing new or fancy, but maybe usefull for anybody who is starting to explore Grails […]