OCLOperators ExecuteQueryPlan
Created by Hans.karlsen on 2022-01-10 · Last edited by Vale.buyondo on 2026-01-31.
In traditional SQL, a query planner looks at static statistics to guess the best path.
In MDriven, because we use Code Injection (derived attributes and associations), the system can't always predict what data is needed just by looking at the query.
The ExecuteQueryPlan acts as an Execution Harness. It begins executing your OCL logic, "observes" when it hits a piece of missing data (a "fault"), pauses to fetch that specific data in bulk from the database, and then resumes execution.
Syntax
selfVM.ExecuteQueryPlan
It is the core strategy used by the system to ensure that complex ViewModels don't execute thousands of tiny individual queries (the N+1 problem).
