This is a migrated thread and some comments may be shown as answers.

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

1 Answer 72 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 03 Nov 2011, 03:35 PM
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?

1 Answer, 1 is accepted

Sort by
0
mike okon
Top achievements
Rank 1
answered on 19 Feb 2013, 02:11 PM
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
Tags
ScheduleView
Asked by
Eric
Top achievements
Rank 1
Answers by
mike okon
Top achievements
Rank 1
Share this question
or