title: Primary key does not exist in the entity in android room with composite key
body: <p>The error I am getting is:</p>
  
  <blockquote>
    <p>error: theme_id, picture_id referenced in the primary key does not exists in the Entity. Available column names:theme_id, picture_id, image</p>
  </blockquote>
  
  <p>I have looked extensively online but i cannot find anything about this.
  This error only seemst to pop uw when trying to use the composite key.
  If I annotate one of the fields with a normal PrimaryKey it works just fine.
  I do not understand what is going on here and it is frustrating that i cannot find anything online about this.
  I hope you guys will be able to help me.</p>
  
  <p>Entity</p>
  
  <pre><code>@Entity(primaryKeys = {"theme_id, picture_id"}, tableName = "picture")
  public class Picture {
  
      @ColumnInfo(name = "theme_id")
      private int themeId;
      @ColumnInfo(name = "picture_id")
      private int pictureId;
      @ColumnInfo(name = "image", typeAffinity = ColumnInfo.BLOB)
      private byte[] image;
  }
  </code></pre>
  
  <p>Dao</p>
  
  <pre><code>@Dao
  public interface PictureDao {
  
      @Insert
      void instertPictures(Picture... pictures);
  
      @Update
      void updatePictures(Picture... pictures);
  
      @Delete
      void deletePictures(Picture... pictures);
  
      @Query("SELECT * FROM picture")
      List&lt;Picture&gt; getAllPictures();
  
      @Query("SELECT * FROM picture WHERE theme_id = :themeId")
      List&lt;Picture&gt; getThemePictures(int themeId);
  
      @Query("SELECT * FROM picture WHERE theme_id = :themeId AND picture_id = :pictureId")
      Picture getPicture(int themeId, int pictureId);
  
  }
  </code></pre>
  
  <p>Database</p>
  
  <pre><code>@Database(entities = {Picture.class}, version = 1, exportSchema = false)
  public abstract class PictureDatabase extends RoomDatabase {
  
      public static final String NAME = "picture_db";
  
      public abstract PictureDao pictureDao();
  }
  </code></pre>