FOREIGN KEY SAME TABLE constraint ?

Here's an interesting error that seemed to pop up unannounced...

The UPDATE statement conflicted with the FOREIGN KEY SAME TABLE constraint.

Anyone know what the cause of this is?

Dan

Can you please provide the details of the Entity (Table) you were trying to update and what were you doing when the issue happens?

Have you a field which type is that same table identifier?

Hi Daniel,

The FOREIGN KEY SAME TABLE error can occur when you have a table that has an attribute which is a foreign key that refers to itself.

The error will occur if the attribute has a value that is not present in the table as a primary key.

Does that scenario match with your data model?

Kind regards,

Stuart

Solution

Turns out it was an error in our code. Sorry for any inconvenience.

Solution