Reference table of a foreign key is prefixed with its database, which causes the table editor to display no columns in the dropdown editor. Fix that by outsourcing some logic from main unit into TForeignKey.ReferenceTableObj. Closes #158

This commit is contained in:
Ansgar Becker
2020-02-11 16:56:41 +01:00
parent ef980de42f
commit ad024cb74b
3 changed files with 24 additions and 10 deletions

View File

@ -2319,7 +2319,7 @@ begin
3: begin
Key := FForeignKeys[Node.Index];
SetEditor := TSetEditorLink.Create(VT, True);
Obj := DBObject.Connection.FindObject(DBObject.Database, Key.ReferenceTable);
Obj := Key.ReferenceTableObj;
if Obj <> nil then begin
Columns := Obj.TableColumns;
for Col in Columns do begin