Multiple Schemas with Annotations #356

terily opened this Issue Jul 10, 2016 · 10 comments


None yet

10 participants

terily commented Jul 10, 2016



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


YZHIWEN commented Jul 11, 2016

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
@greenrobot greenrobot added the Feature label Jul 28, 2016
@greenrobot greenrobot changed the title from What is the right steps to define schemas ? to Multiple Schemas with Annotations Jul 28, 2016

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!

PittyXu commented Oct 13, 2016

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.

Please refrain from "me too" comments. Use the smiley face to add a +1 reaction instead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment