mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 22:49:26 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
654a0b0ce2
@ -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 () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user