getRelationIgnoreKeys()
function getRelationIgnoreKeys(relation): string[];
Defined in: packages/rxdb-model/src/query-builder/utils/metadata-field-extractor.ts:110
获取关系需要忽略的键(避免循环引用)
Parameters
| Parameter | Type | Description |
|---|---|---|
relation | EntityRelationMetadata | 实体关系元数据 |
Returns
string[]
需要忽略的键列表
Remarks
对于 ONE_TO_MANY 和 MANY_TO_MANY 关系,返回 mappedProperty(如果存在) 以避免无限递归
Example
// ONE_TO_MANY: User.orders -> Order.owner
getRelationIgnoreKeys(ordersRelation) // ['owner']