🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators allLoadedObjects
Created by Hans.karlsen on 2017-08-11 · Last edited by Colline.ssali on 2026-01-31.

The allinstances operator returns all objects of the class, but this operator - the allLoadedObjects - 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 it is 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).