j256 / ormlite-android

ORMLite Android functionality used in conjunction with ormlite-core
http://ormlite.com/
ISC License
1.59k stars 367 forks source link

SQLiteDatabase.NO_LOCALIZED_COLLATORS #69

Open groue opened 8 years ago

groue commented 8 years ago

Hello,

The database created with ORMLite contains a table named android_metadata.

Assuming the information that I read at http://stackoverflow.com/questions/2528489/no-such-table-android-metadata-whats-the-problem is true, this means that this has everything to do with custom collations injected by android.database.sqlite.

This is very worrisome for me, since I want to be able to share database files with the sister iOS application. Should those custom collations get referenced by the android database, the database will turn unusable on iOS.

I thus want to avoid this feature, remove the android_metadata table, and avoid depending on android-only collations.

Unfortunately, OrmLiteSqliteOpenHelper won't allow injecting the SQLiteDatabase.NO_LOCALIZED_COLLATORS flag that, it seems, deactivates this feature.

What do you think?

cc @Alexandre-saddour

groue commented 7 years ago

Any news on this subject, @j256?

j256 commented 7 years ago

Sorry for the delay @groue . I don't really know much about this not being an Android expert. What is it specifically that you don't think ORMlite is doing right?

groue commented 7 years ago

Don't worry @j256, I've many horses to beat as well :-)

Specifically, it would be nice if user code could inject the NO_LOCALIZED_COLLATORS option, and maybe, more generally, any flag into android.database.sqlite.SQLiteDatabase.openDatabase(). Today it is impossible since the android.database.sqlite.SQLiteDatabase is opened in a private area of ORMLite.

onkarshelke commented 7 years ago

Is this issue resolved @j256 @groue if yes can u please tell me how do i solve my crash