This question is locked. New answers and comments are not allowed.
Hi All!
How works Use Stored Procedures checkbox on Reverse mapping?
When I check this and click Generate & Save only db class generated..
And is there a way with class generation also generate Add/Edit/Delete methods for that class based on stored procedures(for example generate Class1_Save function which is called stored procedure also generated by OpenAccess for updating data in db)?
Thanks & Best
Yuri
How works Use Stored Procedures checkbox on Reverse mapping?
When I check this and click Generate & Save only db class generated..
And is there a way with class generation also generate Add/Edit/Delete methods for that class based on stored procedures(for example generate Class1_Save function which is called stored procedure also generated by OpenAccess for updating data in db)?
Thanks & Best
Yuri
5 Answers, 1 is accepted
0
Hi Yuri,
By default, Telerik OpenAccess ORM generates dynamically the SQL statements used for CRUD operations. The "Use Stored Procedures" option enables you to select a stored procedure which can be used to override the automatically generated SQL. The stored procedure can be created by OpenAccess as well, if necessary. For more details on how to achieve this, please take a look at this help topic.
Regarding your second question, it is not possible to automatically create Add / Edit / Delete methods in the class definition, as this functionality is handled by the IObjectScope. However, by using the option described above you are getting almost the same behavior - each class can use different stored procedure for particular write operation.
Greetings,
Alexander
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
By default, Telerik OpenAccess ORM generates dynamically the SQL statements used for CRUD operations. The "Use Stored Procedures" option enables you to select a stored procedure which can be used to override the automatically generated SQL. The stored procedure can be created by OpenAccess as well, if necessary. For more details on how to achieve this, please take a look at this help topic.
Regarding your second question, it is not possible to automatically create Add / Edit / Delete methods in the class definition, as this functionality is handled by the IObjectScope. However, by using the option described above you are getting almost the same behavior - each class can use different stored procedure for particular write operation.
Greetings,
Alexander
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Yuri
Top achievements
Rank 1
answered on 07 Oct 2009, 08:43 AM
Hi Alexander,
Thank you for reply!
If I'm right when I check 'Use Stored Procedure' checkbox and choose '<Create Stored Procedure>' option the ORM should create stored procedures after clicking 'Generate & Save' button. So where I can find that stored procedures created by ORM?
Second question is clear.
Thanks & Best,
Yuri
Thank you for reply!
If I'm right when I check 'Use Stored Procedure' checkbox and choose '<Create Stored Procedure>' option the ORM should create stored procedures after clicking 'Generate & Save' button. So where I can find that stored procedures created by ORM?
Second question is clear.
Thanks & Best,
Yuri
0
Accepted
Hi Yuri,
If you select the '<Create Stored Procedure>' option for certain operation, the stored procedure will be created in the database when you rebuild the project. Additionally, please verify that the UpdateDatabase property of the project containing the persistent classes is set to True. Otherwise the database would not be updated.
Kind regards,
Alexander
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
If you select the '<Create Stored Procedure>' option for certain operation, the stored procedure will be created in the database when you rebuild the project. Additionally, please verify that the UpdateDatabase property of the project containing the persistent classes is set to True. Otherwise the database would not be updated.
Kind regards,
Alexander
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jason Maronge
Top achievements
Rank 1
answered on 24 Jan 2011, 11:02 PM
Is there a way to do this for all the tables at once? I just started to use it and have 60 tables and would like the CRUD stuff to be done by stored procedures.
0
Hello Jason,
I am afraid that at the moment there is no way to set this option globally for the whole model. You will have to set the option for each class separately. However, we will consider this as a feature request and add it to our backlog system.
Best wishes,
Alexander
the Telerik team
I am afraid that at the moment there is no way to set this option globally for the whole model. You will have to set the option for each class separately. However, we will consider this as a feature request and add it to our backlog system.
Best wishes,
Alexander
the Telerik team