Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-01-22 15:56:39 +00:00
commit 654a0b0ce2

View File

@ -278,21 +278,21 @@ describe('tree path test', () => {
for (const node of allNodes) { for (const node of allNodes) {
expect(nodeA1.get(treeCollection.filterTargetKey) === node.get('rootPk')).toBeTruthy(); expect(nodeA1.get(treeCollection.filterTargetKey) === node.get('rootPk')).toBeTruthy();
} }
await treeCollection.repository.update({ // await treeCollection.repository.update({
values: { // values: {
parentId: nodeA4.get(treeCollection.filterTargetKey), // parentId: nodeA4.get(treeCollection.filterTargetKey),
}, // },
filter: { // filter: {
name: 'a4', // name: 'a4',
}, // },
}); // });
const pathDataA4New = await db.getCollection(name).repository.findOne({ // const pathDataA4New = await db.getCollection(name).repository.findOne({
filter: { // filter: {
[nodePkColumnName]: nodeA4.get(treeCollection.filterTargetKey), // [nodePkColumnName]: nodeA4.get(treeCollection.filterTargetKey),
}, // },
}); // });
// node primary key shoud be equal to root primary key to avoid infinite loop // // node primary key shoud be equal to root primary key to avoid infinite loop
expect(pathDataA4New.get('nodePk') === pathDataA4New.get('rootPk')).toBeTruthy(); // expect(pathDataA4New.get('nodePk') === pathDataA4New.get('rootPk')).toBeTruthy();
}); });
it('test tree find one', async () => { it('test tree find one', async () => {