title: How can I update a property on a list of grails domain objects?
body: <p>I have a list of domain class objects: </p>
  
  <pre><code>def books = Books.findAllByTitleLike("%Hobbit%")
  </code></pre>
  
  <p>Now I want to update the property "available" in all books in this list. Normally, I would do </p>
  
  <pre><code>books.each {
     it.available = false;
     it.save()
  }
  </code></pre>
  
  <p>Is there a better way to do that? Should I do it in one transaction? Like:</p>
  
  <pre><code>Book.withTransaction { ... }
  </code></pre>