title: Multiple row data not inserted using RoomDB
body: <p><br> When I am trying to insert around 400 rows of data in DB using Room , its inserting only 90 rows of data. Please find below my code :
  <br></p>
  
  <pre><code>@Entity(tableName = "data_info")
  data class DataInfo(
          @PrimaryKey(autoGenerate = true) val uid: Int,
          val body: String?,
          val title:String?) {
  }
  </code></pre>
  
  <p>DataInfoDao.kt</p>
  
  <pre><code>@Dao
   interface DataInfoDao{
  
  @Transaction @Insert
  fun insertAll(resultModel:MutableList&lt;DataInfo&gt; )
  @Transaction @Query("SELECT * FROM data_info ORDER BY uid COLLATE NOCASE ASC")
  fun allDataByName(): DataSource.Factory&lt;Int, DataInfo&gt;
  </code></pre>
  
  <p>}</p>
  
  <p>DataInfoRoomDataBase.kt:</p>
  
  <pre><code>@Database(entities = arrayOf(DataInfo::class), version = 3)
  abstract class DataInfoRoomDataBase : RoomDatabase() {
  
      abstract fun dataInfoDao(): DataInfoDao
      val context:Context?=null
      companion object {
          private var INSTANCE: DataInfoRoomDataBase? = null
  
          fun getDatabase(context: Context): DataInfoRoomDataBase {
              val tempInstance = INSTANCE
              if (tempInstance != null) {
                  return tempInstance
              }
              synchronized(this) {
                  val instance = Room.databaseBuilder(
                      context.applicationContext,
                      DataInfoRoomDataBase::class.java,
                      "datainfo_page_database"
                  )   .fallbackToDestructiveMigration()
                      .addCallback(SRoomDatabaseCallback())
                      .build()
                  INSTANCE = instance
                  return instance
              }
          }
  
      }
  
  
     private class SRoomDatabaseCallback : RoomDatabase.Callback() {
         override fun onCreate(db: SupportSQLiteDatabase) {
             super.onCreate(db)
             /*PopulateDbAsyncTask(INSTANCE)
                 .execute()*/
             fillInDb(INSTANCE)
         }
         private fun fillInDb(db: DataInfoRoomDataBase?) {
             // inserts in Room are executed on the current thread, so we insert in the background
  
             ioThread {
                 db?.dataInfoDao()?.insertAll(prepareDummyData())
  
                /* db?.dataInfoDao()?.insertAll(
                     CHEESE_DATA.map{DataInfo(uid = 0, body="Info" , title = it)}.toMutableList())*/
             }
         }
         private fun prepareDummyData():MutableList&lt;DataInfo&gt;{
             val dummyList = mutableListOf&lt;DataInfo&gt;()
             for(i in 0..400){
                 dummyList.add(DataInfo(uid = 0, body="Info" , title = "Title  $i"))
             }
             return  dummyList
         }
  
      }
  </code></pre>
  
  <p>In the above code in the method "prepareDummyData()" I am prepare dummy data for 400 rows and trying to insert to DB. But only 90 records are getting inserted.</p>
  
  <p>My View model is as below:</p>
  
  <pre><code>class DataInfoViewModel(application: Application) : AndroidViewModel(application) {
  
      var allInfo: LiveData&lt;PagedList&lt;DataInfo&gt;&gt; = MutableLiveData()
      lateinit var dataInfoDao:DataInfoDao
  
       init{
           dataInfoDao = DataInfoRoomDataBase.getDatabase(application).dataInfoDao()
               allInfo = dataInfoDao.allDataByName().toLiveData(Config(pageSize = 30,
                   enablePlaceholders = true
                   ,maxSize = 200))
       }
  
      fun remove(dataInfo: DataInfo) = ioThread {
          dataInfoDao.delete(dataInfo)
      }
   }
  </code></pre>
  
  <p>Please find my View and Adapter classes as below :</p>
  
  <pre><code>class PagingRoomDataBaseFragment:Fragment() {
  
      var fragmentView: View? = null
     // private var listInfoAdapter:ListInfoAdapter?=null
      private var roomDbInfoListFragmentLayoutBinding:RoomDbInfoListFragmentLayoutBinding?=null
     // val dataInfoViewModel: DataInfoViewModel by lazy { ViewModelProviders.of(this).get(DataInfoViewModel::class.java) }
      var  mContainerID:Int = -1
      private val dataInfoViewModel by viewModels&lt;DataInfoViewModel&gt;()
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          roomDbInfoListFragmentLayoutBinding = DataBindingUtil.inflate(inflater, R.layout.room_db_info_list_fragment_layout, container, false)
          roomDbInfoListFragmentLayoutBinding?.lifecycleOwner = this
          fragmentView = roomDbInfoListFragmentLayoutBinding?.root
          container?.let{
              mContainerID =    container.id
          }
  
       //   fragmentView?.floatingActionButton?.visibility.apply { 8 }
  
             // initAdapter()
              intRecyclerView()
              setAdapter()
            //  initSwipeToDelete()
  
              //listInfoAdapter?.refreshList()
              return fragmentView
  
      }
  
      fun intRecyclerView(){
          fragmentView?.dbrecyclerView?.apply {
              layoutManager = LinearLayoutManager(activity)
              addItemDecoration(DividerItemDecoration(activity, DividerItemDecoration.VERTICAL))
          }
      }
  
  
      fun setAdapter(){
          val listInfoAdapter =
              ListInfoAdapter()
            //  dataInfoViewModel.allInfo.observe(this, Observer(listInfoAdapter::submitList))
              fragmentView?.dbrecyclerView?.adapter = listInfoAdapter
          dataInfoViewModel.allInfo.observe(this@PagingRoomDataBaseFragment.requireActivity(), Observer { data -&gt;
                  // Update the cached copy of the words in the adapter.
  
                  data?.let {
                      //view.textView2.text = it.toString()
                      // Log.d("RoomDBFragment","ViewModel Observer is called")
                      Log.d("Fragm","it:::"+it.toString())
                      listInfoAdapter?.setAdapterList(it)
                  }
              })
  
      }
  </code></pre>
  
  <p>Adapter class:</p>
  
  <pre><code>class ListInfoAdapter : PagedListAdapter&lt;DataInfo,ListInfoAdapter.ViewHolder&gt;(diffCallback) {
      private var list: List&lt;DataInfo&gt; = emptyList&lt;DataInfo&gt;()
  
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
  
          val binding: PageDbListItemBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.context), R.layout.page_db_list_item, parent, false)
          return ListInfoAdapter.ViewHolder(binding)
      }
  
      override fun onBindViewHolder(holder: ViewHolder, position: Int) {
         Log.d("ADapter", "Info:::$position" + list.get(position))
          holder.bind(list.get(position)/*getItem(position)*/)
      }
  
      fun setAdapterList(list: PagedList&lt;DataInfo&gt;) {
          this.list = list
          notifyDataSetChanged()
      }
      fun refreshList(){
          notifyDataSetChanged()
      }
      override fun getItemCount(): Int = list.size
  
      class ViewHolder(val binding: PageDbListItemBinding) : RecyclerView.ViewHolder(binding.root) {
          var data : DataInfo? = null
          fun bind(data: DataInfo?) {
              this.data = data
              binding.setVariable(BR.dataInfo, data) // BR - generated class; BR.item - 'item' is variable name declared in layout
              binding.executePendingBindings()
          }
      }
  
      companion object {
          /**
           * This diff callback informs the PagedListAdapter how to compute list differences when new
           * PagedLists arrive.
           * &lt;p&gt;
           * When you add a Cheese with the 'Add' button, the PagedListAdapter uses diffCallback to
           * detect there's only a single item difference from before, so it only needs to animate and
           * rebind a single view.
           *
           * @see android.support.v7.util.DiffUtil
           */
          private val diffCallback = object : DiffUtil.ItemCallback&lt;DataInfo&gt;() {
              override fun areItemsTheSame(oldItem: DataInfo, newItem: DataInfo): Boolean =
                  oldItem.uid == newItem.uid
  
              /**
               * Note that in kotlin, == checking on data classes compares all contents, but in Java,
               * typically you'll implement Object#equals, and use it to compare object contents.
               */
              override fun areContentsTheSame(oldItem: DataInfo, newItem: DataInfo): Boolean =
                  oldItem == newItem
          }
      }
  }
  </code></pre>