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

Obscure error on SaveChanges

1 Answer 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 21 Sep 2011, 05:59 AM
I have simple test trying to add an object to DB.
            BookEntitiesModel book = new BookEntitiesModel();
            Chapter chapter = new Chapter() {Name = "new book"};
            book.Add(chapter);
            book.SaveChanges();
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

Thanks.

{"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) "}

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 23 Sep 2011, 04:35 PM
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.

Regards,
Ady
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 >>

Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or