The Columns in table <table> do not match an existing primary key or unique constraint
Posted
by
Sven
on Stack Overflow
See other posts from Stack Overflow
or by Sven
Published on 2012-04-04T21:16:11Z
Indexed on
2012/04/05
17:28 UTC
Read the original article
Hit count: 257
entity-framework
|foreign-key-relationship
I have 2 tables,
- Stores - storeId (int) and year (int(4)) both Primary Keys.
- fruit - fruitId - Primary Key and storeId.
I need to create 1 to many relationship between the Store and Fruit (Foreign Key held within Fruit) how ever I always get shown the error -
The Columns in table <table> do not match an existing primary key or unique constraint.
The type's are both int and named the same.
Any help would be appreciate in advance, many thanks.
© Stack Overflow or respective owner