title: Grails - not-null property references a null or transient value
body: <p>I have a few basic grails domain objects:</p>
  
  <p>Task
  User</p>
  
  <p>Recently, I wanted to be able to assign tasks to multiple Users.  So I added this code to the Task.groovy class:</p>
  
  <pre><code>static hasMany = [users: User]
  
  static mapping = {
      users joinTable: [name: 'task_user', column: 'user_id', key: 'task_id']
  }
  </code></pre>
  
  <p>So a Task can now be assigned to multiple users using a join table - joining Task and User tables.  Now when I create a new Task, it's giving me the error message:</p>
  
  <p>"not-null property references a null or transient value: blah.User.address"</p>
  
  <p>In the generated join table "task_user" it only needs the user_id from the User object so I don't understand why it's complaining that other user fields are null.  The user object will always be present in the database.  I don't want to have to fully load each user in order to create a new Task. I'm pretty sure it has something to do with cascading.</p>
  
  <p>I want the behavior where if a Task is deleted, the associated entry in the task_user join table should be deleted.  I "never" want the User object updated/deleted as a result of saving a Task. I'm not sure how to proceed.</p>