Skip to content

Commit fdd5182

Browse files
authored
Don't require BaseNode label when marking relationships as inactive when deleting nodes (#2902)
Don't require nodes with relationships pointing to the node being deleted to have BaseNode label. VariantGroup doesn't have these so that was causing a bug. But also, this requirement never really made sense. It just never came up until now.
1 parent fa1b717 commit fdd5182

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/core/database/query/deletes.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ export const deleteBaseNode = (nodeVar: string) => (query: Query) =>
1717
node('propertyNode', 'Property'),
1818
])
1919
// Mark any parent base node relationships (pointing to the base node) as active = false.
20-
.optionalMatch([
21-
node(nodeVar),
22-
relation('in', 'baseNodeRel'),
23-
node('', 'BaseNode'),
24-
])
20+
.optionalMatch([node(nodeVar), relation('in', 'baseNodeRel'), node()])
2521
.setValues({
2622
[`${nodeVar}.deletedAt`]: DateTime.local(),
2723
'baseNodeRel.active': false,

0 commit comments

Comments
 (0)