title: how does save() work in Grails?
body: <p>If I have the following method in my controller:</p>
  
  <pre><code>def save() {
    def userInstance = new User(params)
    if (userInstance.save(flush: true)) {
      def file = request.getFile("myFile")
      userInstance.fileName = file.getOriginalFileName()
    }
  }
  </code></pre>
  
  <p>Even though I've called <code>.save()</code> prior to calling <code>request.fileName = file.getOriginalFileName()</code> the database does have a value for <code>fileName</code> column. I would assume that nothing would get saved after calling <code>.save()</code>?</p>