New Features

GORM

Better GORM events

Previously, GORM supported beforeInsert, beforeUpdate and beforeDelete events, now there is afterInsert, afterUpdate and afterDelete to complete the picture

Persistence of Collections of Basic Types

GORM now supports persisting basic types like String, Integer and so on using a join table:

class Person {
static hasMany = [nicknames:String]
}

Improvements to Data Binding

It is now simpler to bind data to a subset of properties. Previously you could use the syntax:

person.properties = params

Which would bind all the incoming request parameters to the person. If you didn't want that behavior you could use the bindData method. Now you can bind to a subset of properties using the subscript operator:

person.properties["firstName","lastName"] = params

And access a subset of the domain classes properties using the same syntax:

person.properties["firstName","lastName"].each { println it }

Read-Only Access to Objects

Persistent instances can now be loaded in a read-only state using the read method:

def book = Book.read(1)

Default Sort Order

Associations can now be sorted using a default sort order declared at the class level:

Plugins

Global Plugins

Plugins can now be installed globally for all applications:

grails install-plugin webtest -global

Multiple Plugin Repositories

Grails now supports the ability to configure multiple plugin repositories by providing a USER_HOMER/.grails/settings.groovy file or a grails-app/conf/BuildSettings.groovy file that contains the configured repository details:

Automatic Transitive Plugin Resolution

Plugins no longer need to be checked into SVN and will automatically be installed via a plugins metadata when the application is first loaded.

In addition, plugin dependencies are now resolved transitively.

Testing

The Test Framework

The new test framework, available as a plugin for the 1.0.x series, is integrated in Grails 1.1

Scaffolding

Templates and Dynamic Scaffolding

Dynamic scaffolding now uses the templates that can be installed via the install-templates command.

Upgrade notes

Grails 1.1 has a number of changes, but should be mostly backwards compatible with 1.0.x series applications. If you have issues please report them. The following is a list of known issues that need to be considered when upgrading

Plugins are not stored in your USER_HOME directory. You will need to re-install your plugins or run:

grails -Dgrails.plugins.dir=./plugins run-app

Enums are now mapped onto the database with String values instead of ordinals by default