Last updated by 3 years ago

Page: 1.3.1 Release Notes, Version:5

Grails 1.3.1 Release Notes

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.

Grails 1.3.1 has not been released. This page is a placeholder

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
</g:unless>

Improved Query Caching

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

Book.findAll("from Book as b where b.author=:author", [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() } } }