title: hasMany save not working on Grails 2.4.2 upgrade
body: <p>I recently upgraded from Grails 2.2.5 to 2.4.2 . After the upgrade a lot of my hasMany relationships are not saving. </p>
  
  <p>For Example:</p>
  
  <pre><code>Domains:
      class Node {
          String name
          String description
  
          static belongsTo = CustomGlobe
          static hasMany = [containers: Container]
      }
  
      class Container {
          String name
          CustomGlobe customGlobe
  
          static belongsTo = Node
          static hasMany = [nodes: Node]
      }
  
      class CustomGlobe {
          String name
  
          static belongsTo = CustomLocation
          static hasMany = [customLocations: CustomLocation, nodes: Node]
      }
  
      class CustomLocation {
          String name
          String description
      }
  </code></pre>
  
  <p>On the service that performs the transaction I did add a @Transactional above the class def. I also attempted adding a @Transactional(propagation=Propagation.REQUIRES_NEW) per <a href="https://stackoverflow.com/questions/24627819/grails-2-4-2-strange-cascading-save-behaviour-in-nested-transactions">Grails 2.4.2: Strange cascading save behaviour in nested transactions</a>  . If I rollback the Grails upgrade (same controller, service, and view code) the nodes set is persisted correctly, however, with Grails 2.4.2 it does not. I also checked right before and right after the save by printing the object's nodes and it displays on the console, but when my application redirects to the list view it does not show and is not persisted anywhere.  </p>
  
  <p>--UPDATE--
  This still occurs in Grails 2.4.3
  I also believe it may have something to do with the join table, but I can't figure out why. The Container has nodes attached to it after params binding, but after the .save() it is not persisted to the join table. </p>
  
  <p>--UPDATE--
  Sorry, there was an error in the post of the Domain class code, it has been updated and is correct now. Hopefully someone can shed some light on what I'm missing now.</p>
  
  <p>The issue occurs with the Nodes collection not being persisted to the Container instance in the NODE_CONTAINERS table.</p>
  
  <p>--UPDATE--
  Issue is ongoing. When debugging I created a new groovy Sql instance with the Grails datasource and manually inserted the Nodes into the NODE_CONTAINERS table. Everything saved correctly and was recalled correctly when viewing the Container show gsp. So it appears that GORM is treating the join table correctly when reading the instance, still not sure why it isn't saving the Nodes to the join table correctly.</p>
  
  <h1>SAMPLE APPLICATIONS FOR DEMONSTRATION OF ERROR:</h1>
  
  <ol>
  <li>Working Application using Grails 2.2.5 (2.2.5 branch)</li>
  <li>Application exhibiting error described above using Grails 2.4.3 (MASTER branch)</li>
  </ol>
  
  <p>(<a href="https://github.com/bwagner5/grailsCollectionsDebugApp/tree/master" rel="nofollow noreferrer">https://github.com/bwagner5/grailsCollectionsDebugApp/tree/master</a>)</p>
  
  <h1>Grails Data Binder:</h1>
  
  <p>The issue seems to be the Grails Data Binder. The Spring Data Binder works fine (default in 2.2.x and you are able to override the Grails binder in 2.3.x but not 2.4.x)
  I have put in a JIRA but would still like to see if there is a workaround for now:
  <a href="https://jira.grails.org/browse/GRAILS-11638" rel="nofollow noreferrer">https://jira.grails.org/browse/GRAILS-11638</a></p>