forEachMetaData MethodStatic
Deprecated in 5.0 - will not be removed until after 2026-06-13. Please use forEachProperty instead.
Invoke a callback on each property of the specified class, optionally including superclass properties.
forEachMetaData(iModel: IModelDb, classFullName: string, wantSuper: boolean, func: PropertyCallback, includeCustom: boolean = true): void
@note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
@example
// Current usage:
IModelDb.forEachMetaData(imodel, "BisCore:Element", true, (name: string, propMetaData: PropertyMetaData) => {
console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);
}, false);
// Replacement:
await IModelDb.forEachProperty(imodel, "TestDomain.TestDomainClass", true, (propName: string, property: Property) => {
console.log(`Property name: ${propName}, Property type: ${property.propertyType}`);
}, false);
| Parameter | Type | Description |
|---|---|---|
| iModel | IModelDb | The IModel that contains the schema |
| classFullName | string | The full class name to load the metadata, if necessary |
| wantSuper | boolean | If true, superclass properties will also be processed |
| func | PropertyCallback | 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
- core/backend/src/IModelDb.ts Line 1373
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.