跳到主要内容

getRelationIgnoreKeys()

function getRelationIgnoreKeys(relation): string[];

Defined in: packages/rxdb-model/dist/query-builder/utils/metadata-field-extractor.d.ts:69

获取关系需要忽略的键(避免循环引用)

Parameters​

ParameterTypeDescription
relationEntityRelationMetadata实体关系元数据

Returns​

string[]

需要忽略的键列表

Remarks​

对于 ONE_TO_MANY 和 MANY_TO_MANY 关系,返回 mappedProperty(如果存在) 以避免无限递归

Example​

// ONE_TO_MANY: User.orders -> Order.owner
getRelationIgnoreKeys(ordersRelation) // ['owner']