title: Table has no (public) columns only on real device
body: <p>I have the simplest of apps that I thought I would try on my device before I got too engrossed. However, I am getting the strangest error message when I run it on my iPhone (as apposed to the the emulator on my macbook). </p>
  
  <blockquote>
    <p>Table has no (public) columns .</p>
  </blockquote>
  
  <p>I am using the SQLite.Net PCL and I have built it from git hub as I had some problems with it not having the platform dlls for IOS otherwise. </p>
  
  <p>Relevant code. </p>
  
  <p>In my models I have this:</p>
  
  <pre><code>public class Setting
  {
      [PrimaryKey, AutoIncrement]
      public long Id { get; set; }
  
      [Indexed]
      public string Key { get; set; }
  
      public string Value { get; set; }
  
  }
  </code></pre>
  
  <p>The code that throws this error message is the simple:</p>
  
  <pre><code>using (SQLiteConnection db = GetCon ()) {
  
              db.CreateTable&lt;Setting&gt; ();
  }
  </code></pre>
  
  <p>but in my opinion the strangest thing is that this code works fine on the emulator but crashes the application on the iphone itself. </p>
  
  <p>If anyone has some ideas that would be great. </p>
  
  <p>EDIT: 
  This error is thrown on the SQLite.Net-PCL library on <a href="https://github.com/oysteinkrog/SQLite.Net-PCL/blob/master/src/SQLite.Net/SQLiteConnection.cs#L380" rel="noreferrer">this file</a> line 380 but <em>only</em> on the device and not on the emulator.</p>