android - How do get SQLiteDatabase in GreenDao 3 -


since update greendao 3, statements not work anymore:

getdatabase().insert(tablename, null, values); getdatabase().delete(...); getdatabase().update(...); 

the getdatabase() greendao interface doesn't have insert, delete , update methods. thus, gives me compile time errors. solved issue?

the class getting org.greenrobot.greendao.database.database, database abstraction meant greendao. have 2 options:

  1. you hold reference original sqlitedatabase , pass greendao during initialization.

  2. the database abstraction class has method getrawdatabase, returns underlying sqlitedatabase. if not using encryption, android.database.sqlite.sqlitedatabase. have cast.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -