google-developer-training / basic-android-kotlin-compose-training-inventory-app

Apache License 2.0
77 stars 84 forks source link

Persist data with Room #25

Open Omar-Maqboul opened 1 year ago

Omar-Maqboul commented 1 year ago

URL of codelab:

https://developer.android.com/codelabs/basic-android-kotlin-compose-persisting-data-room?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-6-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-persisting-data-room#5

In which task and step of the codelab can this issue be found? task 8, when you build the database

Describe the problem

the table name is items as stated in task 5, but in the query your typed item without "s" @Query("SELECT * from item WHERE id = :id")

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions Android Studio version: API version of the emulator:

Additional information Include screenshots if they would be useful in clarifying the problem.

android-dev-lxl commented 1 year ago

Table name should be items

@Entity(tableName = "items")
data class Item(

Updated the reference in the instructions, code snippet is correct

fe60 commented 1 year ago

Duplicate of #6