I work with Monotouch and use the Debug build for the whole project. I recently changed it to release an assembly to run, and it crashed on startup. Turning debugging symbols, I found that the SQLite problem throws an exception (fictitious?): "Unable to update RealConfigData, it does not have a PC!"
public class RealConfigData { [AutoIncrement, PrimaryKey] public int Id { get; set; } // .. Other fields } public class GameData { [AutoIncrement, PrimaryKey] public int Id { get; set; } public int Seed {get;set;} // .. Other fields }
I get an error when trying .Insert () is the first in the database in which RealConfigData does not have PK! However, this is so.
And with the second I get "The method of obtaining was not found for" Seed "
WTF, it seems that when RELEASE compiles, the metadata is not there or, more precisely, is not reliable ... It seems that he found PK for the second class just fine, but could not at first .. and then he could not find the getter for the field .. . This is madness.
And this code works fine when running debug.
What on earth could be wrong here?
I am ready to release an application for the iPhone, except that at the last moment SQLite crashes on me. Help!
==== This was a distortion:
Update: My other class, which does not have a subclass, is working correctly! So this has something to do with parent / child relationships.
This is not true, an exception has been eaten for this class.