forEach Method
Deprecated in 5.10.0 - will not be removed until after 2026-09-03. Obtain a SchemaView via iModel.getSchemaView() and iterate view.findClass(entity.classFullName)?.getProperties() yourself. SchemaView does not expose the BisCore.CustomHandledProperty custom attribute, so the includeCustom: false filter must be replicated by the caller (query the custom-handled property set via ECSql) if needed.
Call a function for each property of this Entity.
forEach(func: PropertyHandler, includeCustom: boolean = true): void
@note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
@throws Error if metadata for the class cannot be retrieved.
@example
const view = await entity.iModel.getSchemaView();
const cls = view.findClass(entity.classFullName);
if (cls) {
for (const property of cls.getProperties()) {
console.log(`Property name: ${property.name}, Kind: ${property.kind}`);
}
}
| Parameter | Type | Description |
|---|---|---|
| func | PropertyHandler | The callback to be invoked on each property. |
| includeCustom | boolean | If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties. |
Returns - void
Defined in
- backend/src/Entity.ts Line 236
Last Updated: 08 June, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.