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) {
expect(nodeA1.get(treeCollection.filterTargetKey) === node.get('rootPk')).toBeTruthy();
}
await treeCollection.repository.update({
values: {
parentId: nodeA4.get(treeCollection.filterTargetKey),
},
filter: {
name: 'a4',
},
});
const pathDataA4New = await db.getCollection(name).repository.findOne({
filter: {
[nodePkColumnName]: nodeA4.get(treeCollection.filterTargetKey),
},
});
// node primary key shoud be equal to root primary key to avoid infinite loop
expect(pathDataA4New.get('nodePk') === pathDataA4New.get('rootPk')).toBeTruthy();
// await treeCollection.repository.update({
// values: {
// parentId: nodeA4.get(treeCollection.filterTargetKey),
// },
// filter: {
// name: 'a4',
// },
// });
// const pathDataA4New = await db.getCollection(name).repository.findOne({
// filter: {
// [nodePkColumnName]: nodeA4.get(treeCollection.filterTargetKey),
// },
// });
// // node primary key shoud be equal to root primary key to avoid infinite loop
// expect(pathDataA4New.get('nodePk') === pathDataA4New.get('rootPk')).toBeTruthy();
});
it('test tree find one', async () => {