title: Room doesn't autogenerate Primary Key
body: <p>I have the following <strong>Model</strong> for my API Response:</p>
  <pre><code>@Entity(tableName = TABLE_NAME)
  class WeatherEntry {
  
      @PrimaryKey(autoGenerate = true)
      var wID: Long? = null
  
      @SerializedName(&quot;dt&quot;)
      @ColumnInfo(name = COLUMN_DATE)
      var date: String = &quot;&quot;
  
      @SerializedName(&quot;city&quot;)
      @Embedded(prefix = &quot;location_&quot;)
      var location: Location? = null
  
      @SerializedName(&quot;main&quot;)
      @Embedded(prefix = &quot;main_&quot;)
      var main: Main? = null
  
      @SerializedName(&quot;weather&quot;)
      @TypeConverters(Converters::class)
      @Embedded(prefix = &quot;weather_&quot;)
      var weather: ArrayList&lt;Weather&gt;? = null
  
      @SerializedName(&quot;wind&quot;)
      @Embedded(prefix = &quot;wind_&quot;)
      var wind: Wind? = null
  
  }
  </code></pre>
  <p><strong>Weather Repo</strong>
  Fetches Data from Local or Remote Data Source, I set <code>forceRemote</code> to <code>true</code>, because otherwise there would be no data show in the first place.</p>
  <pre><code>class WeatherRepository @Inject constructor(@Local var localDataSource: WeatherDataSource, @Remote var remoteDataSource: WeatherDataSource) :
      WeatherDataSource {
  
     private var caches: MutableList&lt;WeatherEntry&gt; = mutableListOf()
     override fun getWeatherEntries(location: String, forceRemote: Boolean): Flowable&lt;MutableList&lt;WeatherEntry&gt;&gt; {
  
          if (forceRemote) {
              return refreshData(location)
          } else {
              return if (caches.isNotEmpty()) {
                  // if cache is available, return it immediately
                  Flowable.just(caches)
              } else {
                  // else return data from local storage
                  localDataSource.getWeatherEntries(location, false)
                      .take(1)
                      .flatMap(({ Flowable.fromIterable(it) }))
                      .doOnNext { question -&gt; caches.add(question) }
                      .toList()
                      .toFlowable()
                      .filter({ list -&gt; !list.isEmpty() })
                      .switchIfEmpty(refreshData(location)) // If local data is empty, fetch from remote source instead.
              }
          }
      }
  
      /**
       * Fetches data from remote source.
       * Save it into both local database and cache.
       *
       * @return the Flowable of newly fetched data.
       */
      private fun refreshData(location: String): Flowable&lt;MutableList&lt;WeatherEntry&gt;&gt; {
  
          return remoteDataSource.getWeatherEntries(location,true).doOnNext({
  
              // Clear cache
              caches.clear()
              // Clear data in local storage
              localDataSource.deleteAllWeatherEntries()
          }).flatMap(({ Flowable.fromIterable(it) })).doOnNext({ entry -&gt;
              caches.add(entry)
              localDataSource.insertWeatherEntry(entry)
          }).toList().toFlowable()
      }
  </code></pre>
  <p><strong>Local Data Source</strong></p>
  <pre><code>class WeatherLocalDataSource @Inject constructor(private var weatherDao: WeatherDao): WeatherDataSource {
  
      override fun insertWeatherEntry(weatherEntry: WeatherEntry) {
          return weatherDao.insert(weatherEntry)
      }
  
      ...
  }
  </code></pre>
  <p><strong>Remote Data Source</strong>
  This one definitely works as I'm getting all information from the api.</p>
  <pre><code>class WeatherRemoteDataSource @Inject constructor(var weatherService: WeatherService) :
      WeatherDataSource {
  
      override fun getWeatherEntries(location: String, forceRemote: Boolean): Flowable&lt;MutableList&lt;WeatherEntry&gt;&gt; {
          return weatherService.getForecast(
              location,
              &quot;json&quot;,
              &quot;metric&quot;,
              BuildConfig.OPEN_WEATHER_MAP_API_KEY
          ).map(WeatherForecastResponse::weatherEntries)
      }
  }
  </code></pre>
  <p><strong>DAO</strong></p>
  <pre><code>@Dao
  interface WeatherDao {
  
      ...
  
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      fun insert(weatherEntry: WeatherEntry)
  }
  </code></pre>
  <p><strong>Database</strong></p>
  <pre><code>@Database(
      entities = [(WeatherEntry::class)],
      version = 1
  )
  abstract class WeatherDatabase : RoomDatabase() {
  
      abstract fun weatherDao(): WeatherDao
  }
  </code></pre>
  <p>All other fields work correctly, but <code>wID</code> is always null. What is wrong with my implementation?</p>
  <p>I already tried to change it's default value to <code>0</code> and change the type to Int but that's not working either.</p>