update method
The update
method updates an existing entity.
Implementation
@override
FutureOr<void> update(
ReferralModel entity, {
bool createOpLog = true,
}) async {
return retryLocalCallOperation(() async {
final referralCompanion = entity.companion;
await sql.batch((batch) {
batch.update(
sql.referral,
referralCompanion,
where: (table) => table.clientReferenceId.equals(
entity.clientReferenceId,
),
);
});
await super.update(entity, createOpLog: createOpLog);
});
}