New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Schemas with Annotations #356

Open
terily opened this Issue Jul 10, 2016 · 16 comments

Comments

Projects
None yet
@terily

terily commented Jul 10, 2016

1,Entity

image

2, Error
image

What is the right steps to define schemas ?

@greenrobot-team

This comment has been minimized.

Show comment
Hide comment
@greenrobot-team

greenrobot-team Jul 11, 2016

Collaborator

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

Collaborator

greenrobot-team commented Jul 11, 2016

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

@YZHIWEN

This comment has been minimized.

Show comment
Hide comment
@YZHIWEN

YZHIWEN Jul 11, 2016

I still have this problem when I change the schemaVersion.

YZHIWEN commented Jul 11, 2016

I still have this problem when I change the schemaVersion.

@greenrobot

This comment has been minimized.

Show comment
Hide comment
@greenrobot

greenrobot Jul 11, 2016

Owner

If you only have a single schema, do not define schema in @entity.

Multiple schemas is not yet official for annotations.

Owner

greenrobot commented Jul 11, 2016

If you only have a single schema, do not define schema in @entity.

Multiple schemas is not yet official for annotations.

@sixgodIT

This comment has been minimized.

Show comment
Hide comment
@sixgodIT

sixgodIT Jul 12, 2016

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

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

@moneyDragon

This comment has been minimized.

Show comment
Hide comment
@moneyDragon

moneyDragon Aug 5, 2016

i have the same problem,an existing project has four db,so i can't use one schema,please develope this feature asap~

i have the same problem,an existing project has four db,so i can't use one schema,please develope this feature asap~

@fortuneFelix

This comment has been minimized.

Show comment
Hide comment
@fortuneFelix

fortuneFelix Oct 3, 2016

Same here - i have two sqllite databases. So far extremely happy with GreenDao! I hope you support multiple DBs going forward!

Same here - i have two sqllite databases. So far extremely happy with GreenDao! I hope you support multiple DBs going forward!

@PittyXu

This comment has been minimized.

Show comment
Hide comment
@PittyXu

PittyXu Oct 13, 2016

Same, keep 2.x until this issue

PittyXu commented Oct 13, 2016

Same, keep 2.x until this issue

@tatianasolonets

This comment has been minimized.

Show comment
Hide comment
@tatianasolonets

tatianasolonets Oct 24, 2016

Oh no, I need it ASAP. When this feature will be ready?

Oh no, I need it ASAP. When this feature will be ready?

@greenrobot-team

This comment has been minimized.

Show comment
Hide comment
@greenrobot-team

greenrobot-team Oct 25, 2016

Collaborator

To all above: you can continue using greenDAO 2 without any issues. The documentation for the generator also remains available.
-ut

Collaborator

greenrobot-team commented Oct 25, 2016

To all above: you can continue using greenDAO 2 without any issues. The documentation for the generator also remains available.
-ut

@RiccardoM

This comment has been minimized.

Show comment
Hide comment
@RiccardoM

RiccardoM May 11, 2017

@greenrobot-team Any update on this so far?

@greenrobot-team Any update on this so far?

@yunfeng1213

This comment has been minimized.

Show comment
Hide comment
@yunfeng1213

yunfeng1213 May 16, 2017

@greenrobot-team Any update on this so far? support more than one sqllite databases

@greenrobot-team Any update on this so far? support more than one sqllite databases

@kapaseker

This comment has been minimized.

Show comment
Hide comment
@kapaseker

kapaseker Aug 23, 2017

support more than one sqllite databases,please。。。

support more than one sqllite databases,please。。。

@dongcl

This comment has been minimized.

Show comment
Hide comment
@dongcl

dongcl Nov 20, 2017

support more than one sqllite databases,please。。。+1

dongcl commented Nov 20, 2017

support more than one sqllite databases,please。。。+1

@TrueKage

This comment has been minimized.

Show comment
Hide comment
@TrueKage

TrueKage Dec 8, 2017

@greenrobot-team Any update on this feature so far?

TrueKage commented Dec 8, 2017

@greenrobot-team Any update on this feature so far?

@xwangly

This comment has been minimized.

Show comment
Hide comment
@xwangly

xwangly Dec 27, 2017

Any update on this feature so far?

xwangly commented Dec 27, 2017

Any update on this feature so far?

@titanseason

This comment has been minimized.

Show comment
Hide comment
@titanseason

titanseason Dec 28, 2017

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

titanseason commented Dec 28, 2017

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

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