Skip to content

fix(er-position): persist the new position, not the old record#2163

Open
Aias00 wants to merge 1 commit into
OtterMind:mainfrom
Aias00:fix/2160-erposition-save
Open

fix(er-position): persist the new position, not the old record#2163
Aias00 wants to merge 1 commit into
OtterMind:mainfrom
Aias00:fix/2160-erposition-save

Conversation

@Aias00

@Aias00 Aias00 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #2160

Summary

ERPositionStorage.savePosition found the existing record p (carrying the OLD position) and called update(p), discarding param's new position. The ER diagram layout could never be updated for an existing (dataSourceId, databaseName, schemaName) key. Fixed by copying param's position into p before updating: p.setPosition(param.getPosition()); update(p);.

Verification

  • mvn compile -> BUILD SUCCESS.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.

savePosition found the existing record p (with the old position) and
called update(p), discarding param's new position. Copy param's
position into p before updating.

Fixes OtterMind#2160

Co-Authored-By: Claude <noreply@anthropic.com>
@Aias00
Aias00 requested a review from openai0229 as a code owner July 26, 2026 07:13
Copilot AI review requested due to automatic review settings July 26, 2026 07:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

ERPositionStorage.savePosition persists the old position instead of the new one

3 participants