Open naitbrahim opened 3 years ago
You can supply any database that satisfies the Database
interface requirements to DaoMaster(db)
. Does that not work for you?
How can I do that ? I have an SQLiteDatabase class that implements Database interface from Greendao but I cannot override onCreate with this one.
@Override public void onCreate(org.sqlite.database.sqlite.SQLiteDatabase db) { super.onCreate(db); }
EDIT : What I want to replace is this : "import org.greenrobot.greendao.database.Database" by this one : "import org.sqlite.database.sqlite.SQLiteDatabase"
The last one implements already the Database interface. But I cannot see how I can do it.
Thank you in advance for your help
You can write a wrapper/helper class similar to DatabaseOpenHelper.
Hello there,
First of all, I want to thank you for your work, these tools are awesome, keep up the good job !
My issue is that the JSON1 module is not activated by default in the SQLiteDatabase that Android embeds in their OS.
I looked for a solution, the only thing I found is to embed my own SQLite version inside the project. this is what I've done (using NDK to compile it, etc..).
Now my question, is how to force Greendao to use this Database instead of the standard one ?
NB : this is where I took the SQLite database => https://www.sqlite.org/android/doc/trunk/www/install.wiki#buildnative
Thank you for your time and efforts,
Kindly regards.