Skip to content

Commit 26264d4

Browse files
fix: reset alias node counter on dependencies clear
Fixed bug where combining diagrams created duplicate alias nodes (orange dots for renamed FKs). The issue was that _node_alias_count wasn't reset when clear() was called, so each load() created new IDs. Now Person + Marriage shows 2 alias nodes instead of 4. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ba1a237 commit 26264d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/datajoint/dependencies.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def __init__(self, connection=None) -> None:
137137
def clear(self) -> None:
138138
"""Clear the graph and reset loaded state."""
139139
self._loaded = False
140+
self._node_alias_count = itertools.count() # reset alias IDs for consistency
140141
super().clear()
141142

142143
def load(self, force: bool = True) -> None:

0 commit comments

Comments
 (0)