[SQL Server] - DDL For *Existing* Index Gets Table Wrong
- Dominant language
- Java
- Stars
- 51.8k
- Forks
- 4.4k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 188
Description
### Description
See screengrab:

It's the right index, but the wrong table. The table in the DDL exists; but is in an entirely different database that exists on the same server.
### DBeaver Version
Version 24.0.0.202403031740
### Operating System
Windows 10
### Database and driver
Microsoft JDBC Driver 8.2 for SQL Server 8.2.0.0
### Steps to reproduce
Not entirely sure, to be honest :/
It seems to have something to do with if you have a database + schema 'bolded' in the Database Navigator, but you either:
a) expand a different database / schema / table / index tree by clicking just the 'expand' (+) icons and then immediately RH click the 'create SQL -> DDL' menu option (without specifically 'selecting' some component of the Navigator tree) or
b) you have already expanded the 'tree' to view and can see the index you want to generate the DDL for; but you have a different database/schema/table 'bolded' in the Database Navigator.
I haven't _exactly_ narrowed down what the circumstances are. Sorry.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.