fix: update field error (#1645)

This commit is contained in:
ChengLei Shao 2023-04-04 10:44:30 +08:00 committed by GitHub
parent caee2bf213
commit 914260ed7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -43,12 +43,14 @@ export class HasManyRepository extends MultipleRelationRepository implements IHa
addFilter[this.associationField.targetKey] = options.filterByTk;
}
return await targetRepository.find({
...omit(options, ['filterByTk']),
const findOptions = {
...omit(options, ['filterByTk', 'where', 'values', 'attributes']),
filter: {
$and: [options.filter || {}, addFilter],
},
});
};
return await targetRepository.find(findOptions);
}
@transaction((args, transaction) => {

View File

@ -673,6 +673,7 @@ describe('collections repository', () => {
filterByTk: 'a',
values: {
key: C.key,
collectionName: 'c',
uiSchema: {
title: 'c-hello-world',
},