1
Views
3
Comments
Changed Attributes - Will an unchanged record trigger an update query?
Question
The documentation* states:

When the Update Behavior is set to 'Changed Attributes', even if there are no changed attributes, there is still an update event to ensure that listening BPT Processes are notified.

Does this mean that an update query will still be issued? What I'm interested to know is: will the update be sent to the database and, for that reason, will a lock be created on that record?

*https://www.outsystems.com/help/servicestudio/9.0/default.htm#Using_Data/Entity_Properties.htm
2012-03-16 12-21-09
João Rosado
Staff
Hi Ricardo,

Yes a update with still be sent to the database and the lock will still be issued for the record.
The update query will be the simplest as possible and look something like

Update {Entity} set [OneOfTheAttributes] = [OneOfTheAttributes] where [Id] = @id

Regards,
João Rosado
2022-09-30 21-28-30
Ricardo Sousa
Hi João and thank you for the feedback.

Just to be 100% clear, So it will issue a update like:

Update {Entity} set [OneOfTheAttributes] = [SameValueAsTheOneCurrentyOnTheDB] Where [Id] = @id

?
2012-03-16 12-21-09
João Rosado
Staff
It's like the one I said, just the column name on both sides so it uses the value already in the table without having to read it.

Regards,
João Rosado
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.