I have a class Session that is a model which gets created using Firebase using onDataChange.
When I extend this model from SugarRecord, the app crashes with the following stacktrace:
FATAL EXCEPTION: main
com.firebase.client.FirebaseException: Failed to bounce to type
at com.firebase.client.DataSnapshot.getValue(DataSnapshot.java:185)
at xyz.eventapp.apiclient.APIClient$1.onDataChange(APIClient.java:14)
at com.firebase.client.core.ValueEventRegistration.
fireEvent(ValueEventRegistration.java:56)
at
com.firebase.client.core.view.DataEvent.fire(DataEvent.java:45)
at com.firebase.client.core.view.EventRaiser$1.run(EventRaiser.java:38)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not
access private java.lang.reflect.Field() (from class
java.lang.reflect.Field; failed to set access: Can't make field
constructor accessible
This is not only the case with SugarRecord but with any ORM like DBFlow.
So does it mean that I cannot extend any class from a model that is being created using the onDataChange contract?