Issue With Identity on Entity Update

Thread is closed for posting
2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 04 Dec 2012 Link to this post


    When I create a new table in SQL Server, with the first column setup as the primary key identity, OpenAccess brings the entity in, sets the Identity flag on the primary key column to true, and sets the Identity Mechanism as DatabaseServerCalculated.  But for some reason, when you create the table without the identity specified, then later alter the table to add an identity, on update of that entity using OpenAccess's "Update from Database" option, the Identity property is set to true, but the Identity Mechanism is not changed, so I have to manually switch the value to DatabaseServerCalculated (otherwise an error occurs).

    Why would that be?  I am using custom templates with some modifications, and chose the attribute approach.

  2. Dimitar Tachev
    Dimitar Tachev avatar
    67 posts

    Posted 07 Dec 2012 Link to this post

    Hi Brian,

    I am sorry for the inconvenience caused. 

    Unfortunately this is a known issue which is already in our ”to do” list and you may see the fix included in a future version of OpenAccess ORM.

    Dimitar Tachev
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Back to Top