Stored Procedures on Junction Tables... How do I set them?

2 posts, 0 answers
  1. Eric
    Eric avatar
    7 posts
    Member since:
    Aug 2011

    Posted 03 Nov 2011 Link to this post

    I have a security model in place that only allows execute permissions on the database for the currently logged in users. What this means is that the user that is creating a schedule appointment doesn't have INSERT permissions... I have mapped all of my tables to stored procedures and have gotten everything working for the most part.
    The problem I am having is that I can't find a way to map a stored procedure to my junction tables (i.e. I have a SaveSqlAppointment method and a SaveSqlResource method that are mapped to my SqlAppointments and SqlResources tables respectively. I also have a SaveSqlAppointmentResource method, but I cannot map that to my SqlAppointmentResources table via the Entity Framework designer.)
    This scenario is throwing an error stating the current user cannot run INSERT on SqlAppointmentResources.
    Is there a simple way to either implement this or bypass M2M4RIA for my INSERT and UPDATE methods? Any idea of what potential implications there are for adding SqlAppointmentResources to my Entity designer, creating 1-to-many relationships, removing my many-to-many relationships, and mapping my procedures that way?
  2. mike okon
    mike okon avatar
    40 posts
    Member since:
    Dec 2009

    Posted 19 Feb 2013 Link to this post

    Hi Eric

    If you don't mind me asking, were you able to resolve this problem. Im kind of at the same junction you were. Has the recent Q3 release made things easier?  Im looking to configure the SQLAppointments table with a userID and hopefully not have to rebuild all the required stored procedures from scratch. In your opinion is there no other way?

    mike
  3. DevCraft banner
Back to Top