mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-11 18:35:49 +01:00
Fix crash with newly synced summaries.
It would be probably better to only pass needed data with the intent for starting the activity instead of the full blown dao object with relations.
This commit is contained in:
parent
c20810059d
commit
da4c58305e
@ -121,6 +121,7 @@ public class GBDaoGenerator {
|
|||||||
|
|
||||||
private static Entity addUserInfo(Schema schema, Entity userAttributes) {
|
private static Entity addUserInfo(Schema schema, Entity userAttributes) {
|
||||||
Entity user = addEntity(schema, "User");
|
Entity user = addEntity(schema, "User");
|
||||||
|
user.implementsSerializable();
|
||||||
user.addIdProperty();
|
user.addIdProperty();
|
||||||
user.addStringProperty("name").notNull();
|
user.addStringProperty("name").notNull();
|
||||||
user.addDateProperty("birthday").notNull();
|
user.addDateProperty("birthday").notNull();
|
||||||
@ -147,6 +148,7 @@ public class GBDaoGenerator {
|
|||||||
// additional properties of a user, which may change during the lifetime of a user
|
// additional properties of a user, which may change during the lifetime of a user
|
||||||
// this allows changing attributes while preserving user identity
|
// this allows changing attributes while preserving user identity
|
||||||
Entity userAttributes = addEntity(schema, "UserAttributes");
|
Entity userAttributes = addEntity(schema, "UserAttributes");
|
||||||
|
userAttributes.implementsSerializable();
|
||||||
userAttributes.addIdProperty();
|
userAttributes.addIdProperty();
|
||||||
userAttributes.addIntProperty("heightCM").notNull();
|
userAttributes.addIntProperty("heightCM").notNull();
|
||||||
userAttributes.addIntProperty("weightKG").notNull();
|
userAttributes.addIntProperty("weightKG").notNull();
|
||||||
@ -166,6 +168,7 @@ public class GBDaoGenerator {
|
|||||||
|
|
||||||
private static Entity addDevice(Schema schema, Entity deviceAttributes) {
|
private static Entity addDevice(Schema schema, Entity deviceAttributes) {
|
||||||
Entity device = addEntity(schema, "Device");
|
Entity device = addEntity(schema, "Device");
|
||||||
|
device.implementsSerializable();
|
||||||
device.addIdProperty();
|
device.addIdProperty();
|
||||||
device.addStringProperty("name").notNull();
|
device.addStringProperty("name").notNull();
|
||||||
device.addStringProperty("manufacturer").notNull();
|
device.addStringProperty("manufacturer").notNull();
|
||||||
@ -183,6 +186,7 @@ public class GBDaoGenerator {
|
|||||||
|
|
||||||
private static Entity addDeviceAttributes(Schema schema) {
|
private static Entity addDeviceAttributes(Schema schema) {
|
||||||
Entity deviceAttributes = addEntity(schema, "DeviceAttributes");
|
Entity deviceAttributes = addEntity(schema, "DeviceAttributes");
|
||||||
|
deviceAttributes.implementsSerializable();
|
||||||
deviceAttributes.addIdProperty();
|
deviceAttributes.addIdProperty();
|
||||||
deviceAttributes.addStringProperty("firmwareVersion1").notNull();
|
deviceAttributes.addStringProperty("firmwareVersion1").notNull();
|
||||||
deviceAttributes.addStringProperty("firmwareVersion2");
|
deviceAttributes.addStringProperty("firmwareVersion2");
|
||||||
|
Loading…
Reference in New Issue
Block a user