When I save a single object in my Android app using Backendless.Persistence.of(MyClass::class.java).save(object) is working fine.
But when I save multiple objects with Backendless.Persistence.of(MyClass::class.java).create(listObject) or Backendless.Data.of(MyClass::class.java).create(listObject), all boolean fields are saved in Backendless table as their default values (as setted in schema) and not as my values.
eg. if default value of column “isOnline” is FALSE and I set my object.isOnline = TRUE, the object is saved as FALSE.
application ID C7E4D6B0-688D-F07A-FF85-8F60722C2600
This s my class:
data class Test (
var isOnline:Boolean?=null,
var nome:String?=null,
var objectId:String?=null
)
This is the code:
private fun setPointer() = GlobalScope.launch(Dispatchers.IO) {
val test = mutableListOf<Test>()
for (i in 1…10){
test.add(Test(i%2==0,“Hello, Backendless”))
}
Hi, Ryta.
Have you tried to save list of objects using Java method?
As i understood you use Kotlin? So could you please to perform saving process with both languages to determine where the problem is?
I took your code and ran it on both my app and your app. All records have correct boolean value after saving.
Can i ask you to try with entirely new simple android app with only one Activity and only one method that perform creation and saving instances of ‘Test’ class.
if the problem is still reproduced, please send us this simple project entirely as is.
I was now able to reproduce the problem with create bulk API in Android environment. I’ve scheduled a task to fix the problem. For reference ticket ID is - BKNDLSS-19016. Sorry for the inconveniences it may have caused