samedi 4 avril 2015

Can not generate greenDao Entity with lowercase

I am using GreenDao library in my project and I have a problem when I want to read from DB, it gives me android.database.sqlite.SQLiteException: no such table.


I know the reason why this happens. Its because when I generate the Scheme and add entity like this: addEntity("userX") the generated table is USER_X.


The problem is that I have loaded the db from assets and the table name is userX , not USER_X . I read in the greendao doc that: For example, a property called “creationDate” will become a database column “CREATION_DATE”.


My question is how can I change these defaults ? I have searched in documentation for a solution but I havent found any solution. Is there a solution for my problem?


Thanks


Aucun commentaire:

Enregistrer un commentaire