Could not create foreign key constraint

There are two entities Main entity and a child entity. The delete rule was set to protect in child entity. 

Then by mistake, I changed it to ignore. Now when I am trying to revert it to protect it is giving me this error:

"Could not create foreign key constraint".

Need help on this.

  Delete that fk of entity B and create again(if possible) create again 

because its not regarding the rules its due to circular dependency so to give delete you need to give delete to both

go through this for better understanding

More discussion on this in below URL similar problem

Thanks and Regards,

Akshay Deshpande


Hi @Akshay Deshpande šŸš€ 

Thank you for the reply, luckily I found the exact row which was causing the issue in table B, so I have deleted that row and again set the delete rule to protect and it works.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.