title: grails executeUpdate flushing error in integration test
body: <p>I have a service which updates a db column.  The update is done using executeUpdate.  In my test after the service method I'm trying to load the record.  The record loads and every field is populated except for the one I just updated in the service.</p>
  
  <p>To make it stranger, when I run the code normally through a browser it works perfectly.  I can look in the database and see that the field is being persisted.  It's only the integration test that doesn't work.  It's got to be some type of hibernate session issue with the dirty field.</p>
  
  <p>Here is my stripped down code.  I left out the controller info.  My test calls the controller, the controller calls the service.</p>
  
  <pre><code>class BasicProfile {
     static hasMany = [ photos:Photo ]
  }
  
  class Photo {
     BasicProfile basicProfile
      String caption
      String publicId
  
     static belongsTo = [ basicPofile:profile ]
  }
  
  
  class PhotoService {
  
     def updateCaption() {
         ...
          Photo.executeUpdate("update Photo p set p.caption = ? where p.basicProfile.id = ? and p.publicId = ? ",
              [newCaption, profile.id, publicId])
          ...
      }
  }
  
  
  void testUpdateCaption() {
     ... 
      controller.updateCaption() //controller just calls the photoService method
      //get json result from controller to load publicId
      ...
      Photo photo = Photo.findByPublicId(publicId)
  
      assertEquals "my new caption", photo.caption  //photo.caption is null, but the rest of the photo object is populated properly from the database load
  }
  </code></pre>
  
  <p>I've added a breakpoint on the assert so I can view the photo instance.  It's a valid instance and every field is populated with the data from when it was created (prior to calling controller.updateCaption().  But after calling controller.updateCaption(), the caption field should have valid data, but it's still null (the default when the instance is created).</p>