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
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 :-D ), John Mayer parece que es toda una celebridad en USA. Yo, para variar, lo conocí por recomendación de mi hermano (que, por cierto, aprovecho para […]
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 inheritance and different relationships between […]
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 resolve the property in the […]
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.
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.
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 JSON capabilities. For the sake […]
I often find myself trying to know which directories are consuming most of my persistent memory (I would say hard disk, but it isn't a disk - and probably, even hard - anymore), and always get disappointed with myself for not being able to remember the way to do it in the terminal :) . […]