在处理user路径时正确的处理外键

This commit is contained in:
Xu Chang 2023-07-25 17:02:41 +08:00
parent af7229df94
commit a4ebb81c40
2 changed files with 2 additions and 2 deletions

View File

@ -1700,7 +1700,7 @@ var RelationAuth = /** @class */ (function () {
}
// 说明是通过userId关联
var contained = {};
(0, lodash_1.set)(contained, "".concat(path, "Id"), context.getCurrentUserId());
(0, lodash_1.set)(contained, "".concat(path, ".id"), context.getCurrentUserId());
if ((0, filter_1.checkFilterContains)(entity, context, contained, filter, true)) {
return ele;
}

View File

@ -1984,7 +1984,7 @@ export class RelationAuth<ED extends EntityDict & BaseEntityDict>{
}
// 说明是通过userId关联
const contained = {};
set(contained, `${path}Id`, context.getCurrentUserId());
set(contained, `${path}.id`, context.getCurrentUserId());
if (checkFilterContains(entity, context, contained, filter, true)) {
return ele;
}