Support Topics Documentation Slack YouTube Blog

Why field updated not auto update?

Why field updated not auto update?

1 Like

What API do you use to update an object?

I just checked my entire database and all updated fields are empty?

All direct methods like:
Backendless.data.of(table).setRelation, … or unitOfWork.setRelation do not change the updated field

You’re correct. The methods to set a relation do not trigger changes for the “updated” column in the objects.

1 Like

but i need them to be able to sort my list of data, do you have any other way?

You could include an operation to update object directly in the transaction.
For “Backendless.data.of(table).setRelation” you could add cloud code to update the object directly as well.

can you tell in more detail?

This is the API for updating an object in a transaction:
https://backendless.com/docs/flutter/data_transactions_updating_single_object.html

This is the doc on event handlers:
https://backendless.com/docs/bl-js/bl_event_handlers.html

Tks @mark-piller
like your document we will update the fields in the table successfully but it doesn’t mention changing the value in the relation field?

Do you mean the documentation doesn’t say that using setRelation will not change the “updated” field?

Yes @mark-piller :frowning:

No worries, we will update the doc to mention that.