views:

305

answers:

1

Hi

I have some tables and I can't get them to map.

aspnet_Users
UserId<PK>
//Other Fields

Table A(intermediate table)
UserId<PK>


Table B
UserId<PK>
Field1
Field2
Field3

Yep when I add these 3 tables in I will either get a 1 to 1 relationship with

aspnet_users to Table A

or

Table A to Table B

I need to have

aspnetusers to Table A to Table B

I tried to add this association but it never works.

Error 3021: Problem in Mapping Fragment starting at line 168: Each of the following columns in TableA is mapped to multiple conceptual side properties:

How do I fix this?

+4  A: 
Jay
Maybe I am not adding the associations the right way. How did you do it? I can't get my tables to show up like yours.
chobo2
Added the DB Relationships screen shots for TableA
Jay
I don't have that Foreign Key Relationships window. Where is it? I can't find it.
chobo2
oh wait that is for sql. I see that
chobo2
Ok It works. I did not know the thing was so picky. I just dragged the relationship in SQl from one primary key to another since I thought it did not matter which way it went in this case since they both are primary keys.
chobo2
Now I need to figure out how to get Roles and UserInRoles to work together
chobo2
Sorry I stepped away for a few hours :) Did you get everything working? Users and roles will be a bit different probably and you will have a Users, a Roles and a mapping table with 2 columns, UserID and RoleID. When you set up your foreign keys in SQL you will only see two mapped tables in Entity designer, it hides the mapping table on purpose. GL and hit me up if you have any more questions.
Jay