OCLOperators SuspectExternalUpdateInvalidate
No edit summary
(Automatically adding template at the end of the page.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If you for some reason suspect that a third party has changed rows in the database you can use [[selfVM]].SuspectExternalUpdateInvalidate(listOfObjectsYouSuspect).
If you - for some reason - suspect that a third party has changed rows in the database, you can use [[selfVM]].SuspectExternalUpdateInvalidate(listOfObjectsYouSuspect).


Doing so will notify the SyncServer (you have a sync server in MDrivenServer) that this row needs to be reread completely - by all clients that has this row cached.
Doing so will notify the SyncServer (you have a sync server in MDrivenServer) that this row needs to be reread completely - by all clients that have this row cached.


Clients will be get this information when doing their next Refresh (available via selfVM.Refresh and as framework action).
Clients will get this information when doing their next Refresh (available via selfVM.Refresh and as a Framework action).


The SuspectExternalUpdateInvalidate operation can made part of a bigger pattern to make MDriven play nice with others that write data. In SQLServer there is the [[SQL Server change tracking|Change Tracking]] functionlity. Change tracking makes it possible to ask for changed rows - combine this functionality (that can be called with [[OCLOperators sqlpassthroughobjects|SqlPassthrough]]) and you get a system that finds changes by others and changes by triggers.
The SuspectExternalUpdateInvalidate operation can be made part of a bigger pattern to make MDriven play nice with others that write data. There is the [[SQL Server change tracking|Change Tracking]] functionality in the SQLServer. Change tracking makes it possible to ask for changed rows - combine this functionality (that can be called with [[OCLOperators sqlpassthroughobjects|SqlPassthrough]]) and get a system that finds changes by others and changes by triggers.
[[Category:OCLOperators]]
[[Category:OCLOperators]]
[[Category:OCL ViewModel Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:40, 10 February 2024

If you - for some reason - suspect that a third party has changed rows in the database, you can use selfVM.SuspectExternalUpdateInvalidate(listOfObjectsYouSuspect).

Doing so will notify the SyncServer (you have a sync server in MDrivenServer) that this row needs to be reread completely - by all clients that have this row cached.

Clients will get this information when doing their next Refresh (available via selfVM.Refresh and as a Framework action).

The SuspectExternalUpdateInvalidate operation can be made part of a bigger pattern to make MDriven play nice with others that write data. There is the Change Tracking functionality in the SQLServer. Change tracking makes it possible to ask for changed rows - combine this functionality (that can be called with SqlPassthrough) and get a system that finds changes by others and changes by triggers.

This page was edited 47 days ago on 02/10/2024. What links here