Room (AAC): [SQLITE_ERROR] SQL error or missing database (next to "group": syntax error)

After Dao does not work in my Android app:

@Dao
interface GroupDao {

    @Insert
    fun insert(group: Group)

    @Query("SELECT * FROM group")
    fun loadAll(): LiveData<List<Group>>
}

When I create a project in Android Studio 3, I get the following error in the gradle build phase:

: application: kaptDebugKotlin

e: C: \ Workspaces \ SystemicConsensusKotlin \ application \ build \ TMP \ kapt3 \ stubs \ Debug \ de \ maxdobler \ systemicconsensus \ group \ GroupDao.java: 13: Error: There was a problem with the query: SQLID_ERROR] SQL error or missing database data (near "group": syntax error)

e: public annotation android.arch.lifecycle.LiveData> Loadall ();

If I remove the loadAll function, everything works like a charm ... What is the problem with this function?

+4
1

GROUP SQLite. ( - ) GROUP. tableName @Entity, , @Query.

+7

Source: https://habr.com/ru/post/1683472/


All Articles