I am struggling with mapping many to many relationships between more than two tables in ADO.Net Entities Framework.

I am using DotNet 3.5 with VS 2008. All my tables are mapped to entities through the ADO.Net Entities Framework. I had a hard time figuring out how to map many to many relationships between two tables, but by searching on the net I was able to figure out the solution.

Now I have a more complex scenario where there are three tables in a many to many relationship. Here's a rough model:

There are groups, with a GroupID as PK.
There are access rights, with an AccessRightID as PK.
There are users, with a UserID as PK.

Each user can belong to many groups and have many access rights within each group. The table designed to hold this relationship has just three fields:

GroupID
AccessRightID
UserID

All three not null and are FK to the respective table PKs.

If this were a table with just two fields, Entities Framework would automatically create relationships from this table. However with three fields, EF creates a separate entity for this table, which is not what I want.

Any solution?

.