title: Cascade Delete in Gorm does not remove Associated Tables
body: <p>Im new to Gorm. Im trying to do a cascade delete whereby if I delete a User, the Role (Belongs To), Profile (Has One) and Books (One-to-Many) which are associated with the User will be deleted as well.</p>
  <p>I set up my model below but cascading can't seem to work. When I delete my User, the Role, Profile and Books still remain in the database rather than being deleted / soft deleted.</p>
  <p>Can someone point me to where I did wrong? Thanks</p>
  <p><strong>User Model</strong></p>
  <pre><code>type User struct {
      gorm.Model
      Name string `json:&quot;name&quot;`
      Age uint    `json:&quot;age&quot;`
      Profile Profile `gorm:&quot;constraint:OnDelete:CASCADE;&quot;`
      RoleID int `json:&quot;role_id&quot;`
      Role Role `gorm:&quot;constraint:OnDelete:CASCADE;&quot;`
      Books []Book `gorm:&quot;constraint:OnDelete:CASCADE;&quot;`
  }
  
  type Book struct {
      gorm.Model
      Title string `json:&quot;title&quot;`
      UserID uint `json:&quot;user_id&quot;`
  }
  
  type Profile struct {
      gorm.Model
      Country string `json:&quot;country&quot;`
      UserID uint `json:&quot;user_id&quot;`
  }
  
  type Role struct {
      ID int
      Name string `json:&quot;name&quot;`
  }
  </code></pre>