JSONModel throws InvalidDBconfiguration: JSONModel is not registered with a Database
As you replied in stackoverflow JSONModel are mirrors to actual Tables and they don't have table() method. So, this error is thrown:
Process: com.glownet.app.staging.debug, PID: 19083
java.lang.RuntimeException: com.raizlabs.android.dbflow.structure.InvalidDBConfiguration: Table: com.raizlabs.android.dbflow.structure.container.JSONModel is not registered with a Database. Did you forget the @Table annotation?
at com.raizlabs.android.dbflow.runtime.DBTransactionQueue.run(DBTransactionQueue.java:77)
Caused by: com.raizlabs.android.dbflow.structure.InvalidDBConfiguration: Table: com.raizlabs.android.dbflow.structure.container.JSONModel is not registered with a Database. Did you forget the @Table annotation?
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:63)
at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelHelper.process(ProcessModelHelper.java:26)
at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelTransaction.onExecute(ProcessModelTransaction.java:34)
at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelTransaction.onExecute(ProcessModelTransaction.java:12)
at com.raizlabs.android.dbflow.runtime.DBTransactionQueue.run(DBTransactionQueue.java:63)
Following your suggestion I've created this bug. A detailed explanation can be found in: http://stackoverflow.com/questions/28561361/dbflow-using-jsonmodel-throws-invaliddbconfiguration-jsonmodel-is-not-registere
thanks I usually check this pretty often, so it will remind me to get this done.
I still cannot reach the table method TransactionManager.getInstance().addTransaction(new ProcessModelTransaction<>(ProcessModelInfo.withModels(admissionEntitlementJSONModel).table(AdmissionEntitlement.class)));
And if I remove it, ProcessModelTransaction is abstract and wants to implement the process model methods. Could you please provide an example? Maybe adding it to the example app...
I was having the same issue. Turns out I had forgotten to add FlowManager.init(this) in the Application class. Now everything works fine. Even with instant run enabled and without adding any pro guard rules.