CUD Mapping, Insert does not accept SP without parameter

5 posts, 0 answers
  1. Pierick Mellerin
    Pierick Mellerin avatar
    7 posts
    Member since:
    Mar 2010

    Posted 30 Mar 2011 Link to this post


    Hello,

    I have an entity/table with two fields:

    Id (identity, database calculated)
    RowVersion (Timestamp)

    In CUD Mapping, if I select "Map Procedure" for Create SP (without parameter, by design) and I update "Database from Model...", The following error is displayed:

    System.InvalidOperationException

    So, is it possible to map a stored procedure for INSERT without parameter like this:

    CREATE PROCEDURE [dbo].[sp_oa_ins__myTable]
    AS
        INSERT INTO myTable DEFAULT VALUES
        SELECT scope_identity()
    GO

    Thanks in advance.

    Pierrick
  2. Pierick Mellerin
    Pierick Mellerin avatar
    7 posts
    Member since:
    Mar 2010

    Posted 31 Mar 2011 Link to this post

    [Addendum]
    With Entity Framework 4, there is no problem to associate (mapping) a SP like this (INSERT SP without parameter, by example for a table with two fields: Identity field (Id) and Timestamp field (version field)) with an entity... So, is it a bug for OpenAccess and is it a normal behavior (by design) ? Thanks.
  3. DevCraft banner
  4. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 31 Mar 2011 Link to this post

    Hello Pierick Mellerin,

    Firstly I want to apologize for the inconvenience caused.
    It seems to be an issue in the sql generation for stored procedures that are used in CUD mapping scenario. We will do our best to fix the cause for this issue.

    Regards,
    Damyan Bogoev
    the Telerik team
  5. Pierick Mellerin
    Pierick Mellerin avatar
    7 posts
    Member since:
    Mar 2010

    Posted 27 Jun 2011 Link to this post

    Hello,

    I have tested the latest version of OpenAccess (v2011.1.510.1) and the issue is always there: it is not possible to generate a CRUD Insert procedure when the table contains only an identity and a timestamp columns, for example.

    Is there any roadmap about the fix of this problem ?

    Thanks in advance.

    Pierrick
  6. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 30 Jun 2011 Link to this post

    Hi Pierick Mellerin,

    I am afraid that the problem is not fixed yet. We will do our best to fix the issue for the next Q2 release.
    I am sorry for the inconvenience caused.

    Regards,
    Damyan Bogoev
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
Back to Top
DevCraft banner