Last updated by burtbeckwith 4 years ago

Grails 1.3.1 Release Notes

17th May 2010

Grails is a dynamic web application framework built on Java and Groovy, leveraging best of breed APIs from the Java EE sphere including Spring, Hibernate and SiteMesh. Grails brings to Java and Groovy developers the joys of convention-based rapid development while allowing them to leverage their existing knowledge and capitalize on the proven and performant APIs Java developers have been using for years.

Further information about the release can be obtained using the links below:

Filter Ordering

The order in which filters are executed may now be influenced by expressing that a filter depends on some number of other filters.

class MyFilters {
    def dependsOn = [MyOtherFilters]

def filters = { … } }

class MyOtherFilters {

def filters = { … } }

GSP Tag "unless"

A new GSP tag has been provided called "unless", which acts as a counterpart to the existing "if" tag.

<g:unless test="${cacheEnabled}">
  Tag Body Goes Here

Improved Query Caching

The findAll query method now supports taking advantage of the 2nd level cache.

Book.findAll("from Book as b where", [author:'Dan Brown'], [cache: true])

Nested Named Queries

Named queries may now be nested.

class Publication {
   String title
   String author
   Date datePublished
   Integer numberOfPages

static namedQueries = { recentPublications { def now = new Date() gt 'datePublished', now - 365 }

publicationsWithBookInTitle { like 'title', '%Book%' }

recentPublicationsWithBookInTitle { // calls to other named queries… recentPublications() publicationsWithBookInTitle() } } }

TagLib Testing

TagLibUnitTestCase now supports testing custom tags that access the dynamic pageScope property. The pageScope property is now dynamically added to tag libraries at test time.