🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators allLoadedObjects

The allinstances operator returns all objects of the class, but this operator—the allLoadedObjects operator—only returns the objects that are currently loaded. It does not look in the database at all. Hence, it does not load any new objects.

This operator is not your best first choice. Use it with caution, since the result depends on the current state of your application instance and, as such, you may be surprised by the results and think they are inconsistent.

Example:

Department.allLoadedObjects
What this returns

A collection of all Department objects that are currently loaded in memory (for example, those shown in the UI or accessed in the current session).