跳到主要内容

describeEntityFields()

function describeEntityFields(metadata, resolve): EntityFieldsDescriptor;

Defined in: packages/rxdb/src/entity/entity-field.utils.ts:556

生成一个实体的完整字段描述。

Parameters​

ParameterTypeDescription
metadataEntityMetadata已完成 transitionMetadata() 的实体元数据
resolveEntityMetadataResolver关系目标解析器;返回 undefined 直接抛错,不猜测主键类型(D7)

Returns​

EntityFieldsDescriptor

严格 JSON-safe 的字段描述;fields 顺序恒为 propertyMap → computedPropertyMap → relationMap,各组内保持 Map 插入顺序(INV-6)

Throws​

EntityRelationResolutionError 关系目标缺主键或主键类型不受支持

Throws​

RxDBError 关系目标未注册