Does relation change listener work now?

Hi Backendless team, I’m using BackendlessSwift I noticed that in a recent update, some relation change listeners are added in the EventHandlerForClass file, such as addAddRelationListener and addSetRelationListener. I was just wondering do they work now? I tried using this API and seems not working on my side. Besides, the document didn’t seem to cover this update.

Backendless Version (3.x / 6.x, Online / Managed / Pro )

Client SDK (REST / Android / Objective-C / Swift / JS )


Application ID


Hi @Evan_Cui!

Could you provide code example of your listener which didn’t work?
In which way have you added new relations - using Console GUI or via REST API?

Regards, Andriy

Hello @Evan_Cui,

The listeners for relations are not released officially yet.
However, I’ve checked and this code works fine and listener triggers:

let _ ="Person").rt.addAddRelationListener(relationColumnName: "address", responseHandler: { status in
    print("Listener triggered!")
}, errorHandler: { fault in
    print("Error: \(fault.message ?? "")")
})"Person").addRelation(columnName: "address", parentObjectId: "F39C5358-E5E1-46AF-AD6F-5CA4BC9CA21E", childrenObjectIds: ["C17CF32D-02AD-43C4-8EB7-6CCB1A5E3BD1"], responseHandler: { relationsAdded in
    print("Relation added")
}, errorHandler: { fault in
    print("Error: \(fault.message ?? "")")


Hi @olhadanylova, thank you for your quick response. I tested your code, it worked.

However, I use a different way to add relation. I use transaction UnitOfWork to add the relation. In my case, the listener won’t be triggered. My code looks like

        let uow = UnitOfWork()
        let _ = uow.addToRelation(parentTableName: "Person", parentObjectId: "F39C5358-E5E1-46AF-AD6F-5CA4BC9CA21E", columnName: "address", childrenObjectIds: ["C17CF32D-02AD-43C4-8EB7-6CCB1A5E3BD1"])
        uow.execute(responseHandler: { result in
        }, errorHandler: { fault in
           print("Error: \(fault.message ?? "")")

In my project, the addRelation work should be done in a transaction with some other operations. Does your team plan to add this listener support for transactions in the future?

Thanks again. Looking forward to your reply.

Hello @Evan_Cui

Yes, the change you requested is already added to the road-map.
Internal ticket BKNDLSS-22469.
We will let you know in topic when the changes are in.

Hi @Vladimir_Yalovy , Thanks for your confirmation. I’m very much looking forward to the new features.

1 Like

Hello @Evan_Cui

We have implemented this functionality. Please tell me if everything works as you expect?