We have the following case:
We are trying to map with fluent in EF so that when a RoleUser is deleted, all the UserRoleCollection are deleted with cascade. The class RoleUser does not exist in the EF model, because it is a many to many between users and roles.
Our object model is defined like this:
User - RoleList
User - UserRoleConnectionList
Role - UserList
Role - UserRoleConnectionList
UserRoleConnection - UserList
UserRoleConnection - RoleList
UserRoleConnection - ConnectionList
Connection - UserRoleConnectionList
When we delete a Role from a User, the RoleUser should be deleted and also the UserRoleConnections. Currently, it works because the database has ON CASCADE DELETE, but EF is not removing UserRoleConnection from the datacontext, leaving the erased entities.