views:

17

answers:

1

Here is part of my Entity Model which I just generated from a MySql database. My question is why are the tables UserNotes and UserLoginHistory coming out as Zero to One. When I change them to many (collection of usernotes) I get the error:

Error 1 Error 113: Multiplicity is not valid in Role 'user_notes' in relationship 'UserIdFKeyNotes'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be 1. C:\PerforceWorkspace\Web Services\UserDatabaseManipulation\Entity\ServicesModel.edmx 154 11 UserDatabaseManipulation

In terms of foreign keys the user id in all tables references the userid in the user table.

alt text

A: 

UserId in UserLoginHistory is primary key. It means that only 1:0..1 relation is valid because multiple records with the same user id cannot exist in history table.

Ladislav Mrnka
Aaaaaaah... oops. Thanks!
nextgenneo