Sunday 24 May 2009

Upgrading fixed updating, but may have broken creation.

It's a bit late in the evening for me to give a detailed account of what exactly I did, why, and what I found - so here's the short version.

Grails 1.1 was misbehaving whenever we tried to update an existing persisted object.

Grails version 1.1.1 was shown as fixing that particular issue.

I volunteered to be the guinea pig to be the first in the office to try upgrading.

Hurdle 1 - Original Grails 1.1.1 download included an install script with a Windows specific issue

Hurdle 2 - Maven plugin for Grails also would not play nicely (something about a dependency introduced by one of the minor new features added in Grails 1.1.1)


It works - even the updates to existing objects make it to the database without throwing exceptions etc. Hoorah!

A couple of days later we struck an issue where Groovy was unable to determine that an object was supposed to have GORM methods injected. The symptom being that it was unable to find a property (actually method) called save.

Mutter mutter mutter....

The workaround for that case has been to add some code to the BootStrap.groovy file to force Grails/GORM to be aware of that type of object - preventing us from relying on lazy initialisation.

No comments:

Post a Comment