Error 1165 for saving entity with relationship

Steps:

  1. create new entity
  2. create child entity just with objectId (must contatin at least one mandatory field), this entity shoud be alerady existed so I just want to create relationship
  3. set entity from step 2 as related to entiti from step 1
  4. save enity from step 1

result =>
FAULT = ‘1165’ [Column ‘Name’ cannot be empty]

where ‘Name’ is Mandatory filed of already existed entity
reproduces for both iOS and Android sdk

Is it bug or I should do it in some other way?

let child = Child()
child.objectId = "some_id" // entity with this id already exist


		
let someObj = Object()  // new one
someObj.child = child


Backendless.sharedInstance()?.persistenceService.save(someObj, response: { (response: Any?) in
			
}, error: { (fault: Fault?) in
	// error here
})

Have you tried the same algorithm, but with the “child” object retrieved from the server using the “findById” call?

Yes, this way it works, but it is not good solution to make one more api call.
I would consider this approach only if none of normal solutions works.

But in a context of a real app you wouldn’t just know objectId, would you? It would need to come from somewhere and the way backendless works, it would come back from the server in the form of a complete object.

we have our custom api, which return only objectId

I am afraid you’d need to do an extra method call (or return a complete object from your API).