[3.0.0-beta1]Table is not registered with a Database. Did you forget the @Table annotation?
See original GitHub issueBut I have the folowing structure:
@Database(name = WeatherDB.NAME, version = WeatherDB.VERSION)
public class WeatherDB {
public static final String NAME = "Weather";
public static final int VERSION = 1;
}
And table:
@Table(database = WeatherDB.class)
public class WeatherTable extends BaseModel {
@Column
@PrimaryKey
private long dateStamp;
@Column
private double dayTemperature;
@Column
private double minTemperature;
@Column
private double maxTemperature;
@Column
private double nightTemperature;
@Column
private double eveTemperature;
@Column
private double mornTemperature;
@Column
private int humidity;
@Column
private String description;
@Column
private double windSpeed;
//getters and setters
}
Full stacktrace:
Process: me.bitfrom.weatherapp, PID: 3939
com.raizlabs.android.dbflow.structure.InvalidDBConfiguration: Table: me.bitfrom.weatherapp.database.WeatherTable is not registered with a Database. Did you forget the @Table annotation?
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:109)
at com.raizlabs.android.dbflow.config.FlowManager.getModelAdapter(FlowManager.java:271)
at com.raizlabs.android.dbflow.config.FlowManager.getTableName(FlowManager.java:68)
at com.raizlabs.android.dbflow.sql.language.From.<init>(From.java:55)
at com.raizlabs.android.dbflow.sql.language.Select.from(Select.java:58)
at me.bitfrom.weatherapp.ui.fragments.TodaysWeatherFragment.onViewCreated(TodaysWeatherFragment.java:31)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:908)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.app.BackStackRecord.run(BackStackRecord.java:834)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:447)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5389)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
Issue Analytics
- State:
- Created 8 years ago
- Comments:35 (9 by maintainers)
Top Results From Across the Web
[3.0.0-beta1]Table is not registered with a Database. Did you ...
But I have the folowing structure: @Database(name = WeatherDB.NAME, version = WeatherDB.VERSION) public class WeatherDB { public static ...
Read more >Model object<Model.class> is not registered with a Database ...
TestMember is not registered with a Database. Did you forget an annotation? at com.raizlabs.android.dbflow.config.FlowManager.
Read more >DBFlow Guide | CodePath Android Cliffnotes
ProGuard issues. If you are using DBFlow with ProGuard, and see Table is not registered with a Database. Did you forget the @Table...
Read more >Hibernate One To Many Mapping Example Annotation
We can use foreign key constraint for one to many mapping. Below is our database script for Cart and Items table. I am...
Read more >Paging | Android Developers
The Paging Library makes it easier for you to load data gradually and gracefully within your app's RecyclerView. This table lists all the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finally it works for me! I had forgotten to add the Application class on the manifest
<application android:name=“.App.TotoApp”:
+1 ProGuard rule fixed things for me. I suggest it be added a consumer proguard rule for the library?
-keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }