Hello, were testing generating edmx file (using dbcontext api preset), and are having issue with scenario where an entity has many to many relationship with itself (through intermediary table), the generated edmx when used in projects shows the following error
error 0074: NavigationProperty is not valid. The FromRole and ToRole are the same.
Below the line in the edmx which is causing the probelm
<NavigationProperty Name="RoleCollectionViaRolesRole" Relationship="Self.Role_RoleCollectionViaRolesRole_Role_RoleCollectionViaRolesRole_" FromRole="Role" ToRole="Role" />
To further elaborate, below the an example of tables and relations involved (e.g. idea is that each role can have multiple sub roles):
Main Table: Roles
Relationship table (RolesRole) - only has two columns ParentRoleId and ChildRoleId
Relationships:
Roles 1:m RoleRoles (Parent Rlateionship)
Roles 1:m RoleRoles (For Child Relationship)