greenrobot / greenDAO

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
http://greenrobot.org/greendao/
12.63k stars 2.89k forks source link

GreenDao use existing database instead of creating one #606

Closed trantronghien closed 7 years ago

trantronghien commented 7 years ago

I tried using GreenDao to connect the data copied from the assets folder but I get the following error.

03-09 22:47:58.269: E/SQLiteLog(3144): (1) table "FAVORITE" already exists

greenrobot-team commented 7 years ago

See my comment for info about using a database from assets. If a table already exists check the copy step and ensure it does not try to create new tables (greenDAO already does this for you). -ut