Friday, February 24, 2012

How to set a relationship here?

How to create a relation between gf_game and gf_gamegenre here? gf_gamegenre is responsible for the relation between a game and it's genre(s). The relationship between gf_genre and gf_gamegenre worked. (http://img361.imageshack.us/my.php?image=relationzl9.jpg)

When I try to set a relationshop between gamegenre and game I'm getting this error:

'gf_game' table saved successfully
'gf_gamegenre' table
- Unable to create relationship 'FK_gf_gamegenre_gf_game'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_gf_gamegenre_gf_game". The conflict occurred in database "gamefactor", table "dbo.gf_game", column 'gameID'.

Thanks for any help!

Shouldn't gf_gamegenre have a composite primary key of genreID and gameID? Then you would link gf.genreID with gf_gamegenre.genreID and gf_game.gameID with gf_gamegenre.genreID

No comments:

Post a Comment