Error while trying to save a new app table from Android Java based on Java object

java.lang.RuntimeException: Cannot save entity with primitive collection property goals
at com.backendless.async.callback.BackendlessCallback.handleFault(
at com.backendless.Persistence$3.handleFault(
at com.backendless.async.message.AsyncMessage$FaultHandler.handle(
at com.backendless.async.message.AsyncMessage.handleCallback(
at com.backendless.core.AndroidCarrier$1.handleMessage(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(
at dalvik.system.NativeStart.main(Native Method)

What is the data type of the “goals” property?

it’s an ArrayList of Strings

Backendless does not support arrays of primitive values, strings or date objects.

What’s the best practice to save an array of Strings related to an object?

Convert it to a JSON array and save it as a String object.

I’m hitting the 500 character limit, any way I can store it automatically as a text object through android java? Any other options?


If json representation of array is more than 500 characters, please use TEXT column type. You can also store values as string with some separator and parse it on client side.