Relation property name is changed during serialization/deserialization

Hi,

We tries to save an object using Android SDK. In Backendless trigger we tries to get one property of this object(using JavaScript SDK) but we can’t because the first latter of this property name is changed to lower case and we get undefined value.

Could you please provide more information for reproducing ?I need your application Id, cURL of the request demonstrating the problem and a path to an event handler which tries to get that property
Thanks

Please show the class file you use on the Android side. That is the class instance of which you save in Backendless.

Sent an answer to support@backendless.com.

I use SDK for saving the object, so I don’t see real REST request.
Sent app id and path to an event handler to support@backendless.com.

Thanks, we looked into your code. Per the JavaBeans naming convention for the getter/setter methods defined as “getFoo/setFoo”, the property name is “foo”. Therefore the way the properties are serialized by Backendless is correct.

Indeed, a REST request is irrelevant. Please see my comment explaining the behavior.

Actually I used Backendless CodeGenerator and didn’t made any manual changes. What setters/getters should I use for Foo name?

If you need the property to be “Foo”, do not use getter/setters, instead declare a public field:

public String Foo;

In this case code generator contains a bug, I use it for fetching all db entities.

What is the bug?

Incorrect getters and setters were generated by code generator in my case

In the current version the code generator assumes the column names are in lower case.

In version 4 of Backendless you will be able to create your own code generators.

Regards,
Mark