gorm
gorm copied to clipboard
PostgreSQL how to check if returned error is "Violates foreign key constraint" in GORM?
Though I can check with the postgres returned error code but I don't want not to depend on postgres database and would like to handle with gorm. Recently, the support of ErrDuplicatedKey
added that really helped to check the duplication using gorm.
I checked the following errors but nothing seems to check foreign key violates error. Am I missing something?