This is a migrated thread and some comments may be shown as answers.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
1 Answer 25 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stephen
Top achievements
Rank 2
Stephen asked on 07 Mar 2012, 08:41 PM
We upgraded from sitefinity 4.3 to 4.4 and i get an error on a custom module that was outsourced


  personConfiguration.HasAssociation(p => p.Functions).WithOpposite(f => f.Persons)
                 .MapJoinTable("PM_Person_Function", (person, function) => new
                 {
                     PM_Person_ID = person.Id,
                     PM_Function_ID = function.Id
                 }).HasSequenceColumn("PM_Person_Function_ID", "Int"); 

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "ref_PM_Prsn_Function_PM_Person". The conflict occurred in database "PromaxBDA", table "dbo.PM_Person", column 'PM_Person_ID'.

1 Answer, 1 is accepted

Sort by
0
Stanislav Velikov
Telerik team
answered on 12 Mar 2012, 04:31 PM
Hello,

 Review the tables created by the custom modules in the database (the error indicates pm_person). The foreign key constraint prevents the table to be updated or deleted. Check if there are any constraints in the Fluent Mapping of the module and check which entry in the database is conflicting with the foreign key. I suppose it is one module item creating the problem.

Greetings,
Stanislav Velikov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Stephen
Top achievements
Rank 2
Answers by
Stanislav Velikov
Telerik team
Share this question
or