title: Grails cascade delete
body: <p>In my Grails domain I have a 1:1 relationship between <code>Artist</code> and <code>MusicianDetails</code></p>
  
  <pre><code>class Artist {
  
      static hasOne = [musicianDetails: MusicianDetails]
  
      static constraints = {
          musicianDetails(nullable: true, unique: true)
      }           
  }
  
  class MusicianDetails {
      static belongsTo = [artist: Artist]
  }
  </code></pre>
  
  <p>I want deletes of <code>Artist</code> to cascade to the associated <code>MusicianDetails</code>. However, I get a foreign key contraint violation when I delete an <code>Artist</code> with:</p>
  
  <pre><code>Artist.executeUpdate("delete Artist a where a.id = ?", [artistId])
  </code></pre>
  
  <p>The error message is:</p>
  
  <pre><code>Class
      com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
  Message
      Cannot delete or update a parent row: a foreign key constraint fails 
      (`festival2`.`musician_details`, CONSTRAINT `FKA0E6B2145ACE528E` 
      FOREIGN KEY (`artist_id`) REFERENCES `artist` (`id`))
  </code></pre>
  
  <p>What is the correct way to defined a 1:1 relationship between <code>Artist</code> and <code>MusicianDetails</code> such that deletes of the former cascade to the latter?</p>