Entity Framework One-To-One Mapping Issues

Posted by Baddie on Stack Overflow See other posts from Stack Overflow or by Baddie
Published on 2009-11-19T06:51:13Z Indexed on 2010/03/25 18:43 UTC
Read the original article Hit count: 751

Using VS 2010 beta 2, ASP.NET MVC.

I tried to create an Entity framework file and got the data from my database.

There were some issues with the relationships, so I started to tweak things around, but I kept getting the following error for simple one-to-one relationships

Error   1	Error 113: Multiplicity is not valid in Role 'UserProfile' in relationship 'FK_UserProfiles_Users'. 
Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *.  myEntities.edmx	2024

My Users table is consists of some other many-to-many relationships to other tables, but when I try to make a one-to-one relationship with other tables, that error pops up.

Users Table

  • UserID
  • Username
  • Email

etc..

UserProfiles Table

  • UserProfileID
  • UserID (FK for Users Table)
  • Location
  • Birthday

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about entity-framework