dynamite8 / resources-android-dev

Collection of resources for becoming an Android developer
7 stars 7 forks source link

Rectify local Resource POJO with Firebase data structure #82

Closed JaeW closed 6 years ago

JaeW commented 6 years ago

@dynamite8 We have two POJO entities for a Resource object, and the two do not correlate. I understand that the POJO you added matches the Firebase data structure and the one @Somayah88 added matches the fields required in the app so we need to make sure that the local storage structure and cloud structure conform.. Is it possible to change the fields stored in Firebase?

Currently we are using an auto-generated integer field as the primary key for the SQLite db. Since Firebase creates a unique PushId for each record, it would make sense to use that as the primary key, but since it is a hex value and SQLite can only store integers we will need to do a TypeConverter method (which is easy).

In the POJO you created, I don't think we need the fullName field as that was simply to account for Udacity participation. Going forward we might not need it at all. Would it be hard to eliminate that field from the Firebase data structure?

Another field we probably don't need is the timestamp. This is a column which Google adds by default when one stores form data in a sheet.