Deprecated  in 5.0 - will not be removed until after 2026-06-13. Use getSchemaView() on the iModel and call view.findClass(...) instead.

Identical to getMetaData, except it returns undefined instead of throwing an error if the metadata cannot be found nor loaded.

tryGetMetaData(classFullName: string): EntityMetaData | undefined

@example * ```typescript // Current usage: const metaData: EntityMetaData | undefined = imodel.tryGetMetaData("SchemaName:ClassName");

// Replacement: const view = await imodel.getSchemaView(); const cls = view.findClass("SchemaName:ClassName");

| Parameter | Type | Description | |----|----|----| | <span class="parameter-name">classFullName</span> | <span class="parameter-type">string</span> | &nbsp; | **Returns** - <span class="method-output"> EntityMetaData | undefined</span> ### Defined in - <span class="defined-in"><a href="https://github.com/iTwin/itwinjs-core/blob/c3f053b17e3a788f7783b791058f316ec92d5e40/core/backend/src/IModelDb.ts#L1898" target="_blank">backend/src/IModelDb.ts</a></span> Line 1898

Last Updated: 04 June, 2026