I'm trying to build a relatively simple game review site. There should be a 1-to-1 relationship between games and reviews (each review is for one game, and there will only ever be one review for a game). My tables are pretty simple. The relevant parts are:
Reviews Table:
ReviewID - int, primary key
Text - text
GameID - int, foreign key from Games Table
Games Table:
GameID - int, primary key
GameTitle - nvarchar(50)
EF4 keeps mapping it as a 1-to-many relationnship given the existence of a foreign key in Reviews. When I try to change it to 1-to-1 manually, I get the following error:
Error 1 Error 113: Multiplicity is not valid in Role 'Reviews' in relationship 'FK_Reviews_Games'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *.
I'm not sure what the error is trying to say as the foreign key GameID in the Reviews table is the primary key of the Games table. Any ideas?