Skip to content

Invalid resolve of relation #1022

@npyramid

Description

@npyramid

Bug Description

Relation resolving in DBCode depends on the currently selected field, not on the field where the relation icon was clicked.

Repro steps

  1. Open a table/query result where multiple fields have relations (for example, foreign keys).
  2. Do not select any field and click the relation icon near a field.
  3. Observe that relation resolve does not work.
  4. Select Field B.
  5. Click the relation icon near Field A.
  6. Observe that relation resolve is performed for Field B (selected field), not Field A (clicked icon field).

Expected Behavior

Clicking the relation icon should always resolve relation for the field where the icon was clicked, regardless of current selection state.
It should also work even when no field is selected.

Actual Behavior

Relation resolve works only for the currently selected field.
If no field is selected, relation resolve does not work.
If another field is selected, clicking relation icon on a different field still resolves relation for the selected field.

Environment

  • DBCode version: 1.28.16
  • VS Code (or fork) version: 1.111.0
  • OS: Linux x64 6.18.13-zen1
  • Database: pg
  • Connection: SSH

Error Meesages (if applicable)

No explicit error message shown in UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions