strongloop-community / loopback-sdk-android

Android Client SDK for the LoopBack framework.
Other
67 stars 41 forks source link

Returning 0 or null values for some properties #81

Closed GrandmasterGrogu closed 9 years ago

GrandmasterGrogu commented 9 years ago

I have a project on GitHub I am building for my Master's degree project. I am new to Android, but have been working with Loopback for nearly a year now, on various other work and personal projects,

There is a strange little bug I can't seem to figure out. One model is receiving null for two String properties and a zero for an "int" property. Another model is receiving a zero for an "int" property.

This happens regardless of the value in the database for those properties. All the other properties do not have the issue.

The properties returning null or zero https://github.com/alexxgathp/vap/blob/master/client/android-vap-demo/app/src/main/java/com/alexxg/android_vap_demo/DemoTwo.java#L95

https://github.com/alexxgathp/vap/blob/master/client/android-vap-demo/app/src/main/java/com/alexxg/android_vap_demo/DemoTwo.java#L96

https://github.com/alexxgathp/vap/blob/master/client/android-vap-demo/app/src/main/java/com/alexxg/android_vap_demo/DemoTwo.java#L99

https://github.com/alexxgathp/vap/blob/master/client/android-vap-demo/app/src/main/java/com/alexxg/android_vap_demo/DemoTwo.java#L55 The model definitions https://github.com/alexxgathp/vap/blob/master/common/models/device.json https://github.com/alexxgathp/vap/blob/master/common/models/video.json The issue https://github.com/alexxgathp/vap/issues/3 My repository https://github.com/alexxgathp/vap

GrandmasterGrogu commented 9 years ago

It was a cache, typo or a case-sensitive issue for the get or set function. Either way, it resolved itself.