I am working with a project that was setup using forward mapping. There is a many-to-many relationship between user roles and menu items; the database tables are user_role, mnu and user_role_mnu. The classes in the project are UserRole and Menu; there is not a class for the junction table since forward mapping was used.
I added a field to the junction table to control the level of access. My intent was to create the junction table class and use it to control a user’s access to the menu items. I ran the reverse mapping tool and generated the junction table class UserRoleMnu. When running the code, the following exception is thrown when trying to populate the Menu IList in the UserRole class: “Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'user_role_mnu2'. Statement(s) could not be prepared”. The call stack is deep into ORM code.
My guess is ORM provides its own dynamic implementation of the junction table class and names it “user_role_mnu”. Since the reverse mapping created a junction class in my project, ORM now has a class name conflict.
Does anyone know how to resolve this error?