Skip to content

Commit

Permalink
Refs #81 - changes copied from master branch commit 1dbd5bd
Browse files Browse the repository at this point in the history
  • Loading branch information
cbmarcum committed Oct 27, 2019
1 parent 56b6ca0 commit ed2e8c3
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,20 @@ class ProductController {
notFound()
return
}

// since we're not using belongsTo because the database is established
// we'll delete the join table references manually.

product.goodIdentifications.each { gid ->
log.info("deleting goodId ${gid.toString()}")
gid.delete()
}
product.productFeatureAppls.each { pfa ->
log.info("deleting pfa ${pfa.toString()}")
pfa.delete()
}
product.save()

product.delete flush: true

request.withFormat {
Expand Down

0 comments on commit ed2e8c3

Please sign in to comment.