fix: update field error (#1645)
This commit is contained in:
parent
caee2bf213
commit
914260ed7e
@ -43,12 +43,14 @@ export class HasManyRepository extends MultipleRelationRepository implements IHa
|
|||||||
addFilter[this.associationField.targetKey] = options.filterByTk;
|
addFilter[this.associationField.targetKey] = options.filterByTk;
|
||||||
}
|
}
|
||||||
|
|
||||||
return await targetRepository.find({
|
const findOptions = {
|
||||||
...omit(options, ['filterByTk']),
|
...omit(options, ['filterByTk', 'where', 'values', 'attributes']),
|
||||||
filter: {
|
filter: {
|
||||||
$and: [options.filter || {}, addFilter],
|
$and: [options.filter || {}, addFilter],
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
|
return await targetRepository.find(findOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@transaction((args, transaction) => {
|
@transaction((args, transaction) => {
|
||||||
|
@ -673,6 +673,7 @@ describe('collections repository', () => {
|
|||||||
filterByTk: 'a',
|
filterByTk: 'a',
|
||||||
values: {
|
values: {
|
||||||
key: C.key,
|
key: C.key,
|
||||||
|
collectionName: 'c',
|
||||||
uiSchema: {
|
uiSchema: {
|
||||||
title: 'c-hello-world',
|
title: 'c-hello-world',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user