views:

17

answers:

1

I have following entities: alt text

In my code i need to update the FKCategoryID in entity BudgetPost but im getting error:

FKCategoryID is part of the object's key information

Is it any way to update the key in this case or it's not possible?

Thanks in advance

A: 

Why is it a part of the composite key? As long as FKBudgetID is a part of the composite primary key you won't be able to modify it. If you want to enforce uniqueness in the combination of FKCategoryID and FKBudgetID, use a UNIQUE constraint instead.

Dave Swersky
Thanks for the answer.
ilkin