Bug 404891 - Cannot add foreign key to entity
Summary: Cannot add foreign key to entity
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.27.2 (KDE Applications 18.12.2)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-28 06:44 UTC by Yuriy
Modified: 2019-02-28 10:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.27.3 (KDE Applications 18.12.3)


Attachments
Blocked controls (17.24 KB, image/png)
2019-02-28 06:44 UTC, Yuriy
Details
Blocked controls 2 (scr004) (17.48 KB, image/png)
2019-02-28 06:45 UTC, Yuriy
Details
Example data of entity models I use (16.45 KB, application/xml)
2019-02-28 06:46 UTC, Yuriy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy 2019-02-28 06:44:29 UTC
Created attachment 118425 [details]
Blocked controls

I have a lot of entities in my umbrello modeller. So I decided to group entities to folders. The next step was to add foreign key constraint to entities. But.. it does not work =)

I've made some tests on clear project.
1. If I place entities in the root of ERD - all works fine.
2. If I place entities in folder - the controls of "Foreign Key Setup" dialogue are blocked (scr003).
3. The same, if I try to add foreign key to entity at the root of ERD (scr004).
Comment 1 Yuriy 2019-02-28 06:45:41 UTC
Created attachment 118426 [details]
Blocked controls 2 (scr004)
Comment 2 Yuriy 2019-02-28 06:46:53 UTC
Created attachment 118427 [details]
Example data of entity models I use
Comment 3 Ralf Habacker 2019-02-28 09:39:11 UTC
Thanks for this bug report. 
The cause of the problem is that after selecting a referenced entity on the general page located in a folder, umbrello does not find it.
Comment 4 Ralf Habacker 2019-02-28 10:38:10 UTC
Git commit be576384df1b2e8ba6b8fcecf6a2323ce3539413 by Ralf Habacker.
Committed on 28/02/2019 at 10:36.
Pushed by habacker into branch 'Applications/18.12'.

Fix 'Cannot add foreign key to entity'

The search function used in the foreign
key constraints dialog box did not support
searching for subfolders.
FIXED-IN:2.27.3 (KDE Applications 18.12.3)

M  +6    -3    umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
M  +29   -0    umbrello/model_utils.cpp
M  +4    -0    umbrello/model_utils.h
M  +35   -0    umbrello/umldoc.cpp
M  +8    -0    umbrello/umldoc.h

https://commits.kde.org/umbrello/be576384df1b2e8ba6b8fcecf6a2323ce3539413