Obscure error on SaveChanges

Thread is closed for posting
2 posts, 0 answers
  1. Chris
    Chris  avatar
    42 posts
    Member since:
    Apr 2009

    Posted 21 Sep 2011 Link to this post

    I have simple test trying to add an object to DB.
                BookEntitiesModel book = new BookEntitiesModel();
                Chapter chapter = new Chapter() {Name = "new book"};
    On SaveChanges.. I get the following error... (In general, OA error message is rather obscure and hard to understand what's going on...)

    my DB table looks like,

    Id :UInt32
    Content: Byte[]
    IndexAct: Byte
    IndexChapter: Byte
    Name: String
    Version: UInt32


    {"System.NotImplementedException: Conversion from 'System.Int64' to '44' required\r\n   at OpenAccessRuntime.Relational.sql.SqlDriver.convertId(Object v, Int32 t)\r\n   at OpenAccessRuntime.Relational.sql.SqlDriver.mapAutoIncColumnValue(RelationalTable classTable, Object v)\r\n   at OpenAccessRuntime.Relational.sql.MySqlSqlDriver.getAutoIncColumnValue(RelationalTable classTable, Connection con, Statement stat)\r\n   at OpenAccessRuntime.Relational.sql.AutoIncRelationalKeyGenerator.generatePrimaryKeyPost(String className, RelationalTable classTable, Object[] data, Connection con, Statement stat)\r\n   at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)\r\n   at OpenAccessRuntime.Relational.RelationalStorageManager.persistPass1(PersistGraph graph)\r\n   at OpenAccessRuntime.Relational.RelationalStorageManager.doUpdates(StatesToStore toStore, StateContainer container, Boolean retainValues)\r\n   at OpenAccessRuntime.Relational.RelationalStorageManager.store(StatesToStore toStore, DeletePacket toDelete, Boolean returnFieldsUpdatedBySM, Int32 storeOption, Boolean evictClasses) "}
  2. Ady
    Ady avatar
    589 posts

    Posted 23 Sep 2011 Link to this post

    Hi Chris ,

     I was able to reproduce the error and can confirm that this is a bug. The problem is while reading the auto incremented unsigned int PK value. We will fix this asap.

    You could work with an int autoinc PK column if that satisfies your requirements.

    Your Telerik points have been updated.

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

Back to Top