Search code examples
javaandroidandroid-roomgreendaodbflow

Android DBflow : define entity schema name


For my application, I'm using DBflow ORM. Nice and easy, a database is created and filled with my empty tables.

My concern is, how do you define in DBflow, to which schema (database) an entity belongs?

Example: dbo.[Dictionary]

DBfLow @Table annotation provides some methods, but nothing which can define a schema name.

I did a research and found out that GreenDAO @Entity annotation provides a parameter schema = "schema_name".

http://greenrobot.org/greendao/documentation/modelling-entities/

Didn't find anything in Room.

Thank you.


Solution

  • Quoting an example from link

    @Table(databaseName = AppDatabase.NAME)
    public class TestModel1 extends BaseModel {
        @Column(columnType = Column.PRIMARY_KEY)
        public
        String name;
    }
    

    databaseName should do.