Describe the feature

MySQL error 1451 (when you try to delete a parent row that has children, and a foreign key constraint fails. Delete the children first) could be mapped to a gorm error.

Motivation

It's kind of the same as 1452 (when you try to add a row but there is no parent row, and a foreign key constraint fails. Add the parent row first). It could even be mapped to the same gorm.ErrForeignKeyViolated gorm error since it has a generic-enough name.

Related Issues

Not sure

Comment From: a631807682

PR Welcome.

Comment From: ahaostudy

I can help, please assign to me ~

Comment From: kiskit

thanks @ahaostudy