To ensure that certain fields are always included in the sync request, even if they haven't changed, you can use the alwaysWrite configuration for those fields. This configuration forces the field to be included in the sync payload regardless of whether it has been modified.
Here's how you can define a field with alwaysWrite:
class MyTaskModel extends TaskModel {
static get fields() {
return [
{ name: 'myField', type: 'string', alwaysWrite: true },
// other fields
];
}
}
By setting alwaysWrite: true for the field, it will be included in every sync request.