title: unexpected token: mapping
body: <p>I am learning Grails using version 1.3.7 and I keep running into the following syntax error for no apparent reason:</p>
  
  <pre><code>unexpected token: mapping @ line x, column y.
  </code></pre>
  
  <p>Once, I got rid of it by running "groovy clean" and "grails clean", but this time it not even that is working. As far as I can tell, my code is exactly like the example in the book I'm using, and yet it keeps complaining about the word "mapping".</p>
  
  <p>Here is an example of one of my classes where it fails:</p>
  
  <pre><code>package com.grailsinaction
  
  class Post {
  
      String content
      Date dateCreated
  
      static constraints = {
          content(blank: false)
      }
  
      static belongsTo = [ user: User ]
  
      static mapping {
          sort dateCreated: "desc"
      }
  
      static hasMany = [ tags: Tag ]
  }
  </code></pre>
  
  <p>What am I missing? Please advise.</p>