greenDAO
greenDAO copied to clipboard
Multiple Schemas with Annotations
1,Entity
2, Error
What is the right steps to define schemas ?
This error message is a little cryptic @greenrobot. But what I can gather from the migration documentation you have to add the schema version number to your build.gradle
file (where your android
config is as well):
greendao {
schemaVersion 1
}
-ut
I still have this problem when I change the schemaVersion.
If you only have a single schema, do not define schema in @Entity.
Multiple schemas is not yet official for annotations.
Greendao3.0 does not support multiple schema definition? I was in the generator used in the project
_The new Schema (" user ", 1, "com. Example. Test. Greendao");_
After updated to 3.0
Error:Execution failed for task ':app:greendao'.
Undefined schema \"user\" (referenced in entities: UserDb).
Please, define non-default schemas explicitly inside build.gradle
i have the same problem,an existing project has four db,so i can't use one schema,please develope this feature asap~
Same here - i have two sqllite databases. So far extremely happy with GreenDao! I hope you support multiple DBs going forward!
Same, keep 2.x until this issue
Oh no, I need it ASAP. When this feature will be ready?
To all above: you can continue using greenDAO 2 without any issues. The documentation for the generator also remains available. -ut
@greenrobot-team Any update on this so far?
@greenrobot-team Any update on this so far? support more than one sqllite databases
support more than one sqllite databases,please。。。
support more than one sqllite databases,please。。。+1
@greenrobot-team Any update on this feature so far?
Any update on this feature so far?
If you want to use multiple schemas:
Do delete classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
in your root project's build.gradle
and delete apply plugin: 'org.greenrobot.greendao'
in your app project's build.gradle
Just keep compile 'org.greenrobot:greendao:3.2.2'
in your app project's build.gradle
And use dao-generator to generate entities and DAOs
what would happen if one uses multiple schemas?? I ran into some weird migration issues.