Bug 292238

Summary: Umbrello loses Foreign Key attributes in the Entity Relationship Model on re-opening a saved model file.
Product: [Applications] umbrello Reporter: Mario Epp <computer>
Component: generalAssignee: Joris Steyn <kde>
Status: RESOLVED FIXED    
Severity: major CC: javierfvargas, okellogg, ralf.habacker
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: OpenSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.3
Attachments: Umbrello data file with completed foreign key attribute maps.

Description Mario Epp 2012-01-22 23:09:11 UTC
Created attachment 68102 [details]
Umbrello data file with completed foreign key attribute maps.

Version:           unspecified (using KDE 4.6.5) 
OS:                Linux

Umbrello UML Modeler version 2.6.5 (KDE 4.6.5 on openSuSE)
Target Language: MySQL
Model: Entity Relationship

Have a XMI file with 17 tables and 20 foreign keys. On opening the model file, all but 3 foreign key are missing the field mapping, saved as <AttributeMap> in the XMI file.
After mapping the fields with the Properties dialog for each Foreign Key Constraint, the foreign keys appear in the Tree view and get generated in the SQL code. After saving and closing in Umbrello, I open the file with a text editor to check the contents and find all <AttributeMap> elements present.
When I open the file again in Umbrello the field mappings are lost, also getting lost in the generated SQL code (even before saving the model). After saving and checking with the text editor, the <AttributeMap> elements are also missing from XMI file.
The attached file should contains all 20 <AttributeMap> elements, of which 17 get lost on opening the file in Umbrello.

Reproducible: Always

Steps to Reproduce:
Define foreign key field mappings.
Save model.
Close model.
Open model.


Actual Results:  
17 of the 20 foreign key field mappings are missing.

Expected Results:  
All foreign key field mappings should be available for further processing.

OS: Linux (x86_64) release 2.6.37.6-0.11-desktop
Compiler: gcc
Comment 1 Javier 2012-08-09 14:43:48 UTC
What is the status of this report?  I'm experiencing the same problem and it is really anoying, I'm using the SQL code generation and it works great but this bug make my work harder since I have to redefine my foreing key mappings before starting the code generation wizard or keep umbrello open forever.
Comment 2 Joris Steyn 2013-10-06 18:01:17 UTC
Git commit e2fa89fa77f3f906b886ea0a570da9b626d58ca5 by Joris Steyn.
Committed on 06/10/2013 at 17:57.
Pushed by jorissteyn into branch 'master'.

Implement loading foreign key attributes from XMI
Related: bug 212779

M  +15   -8    umbrello/foreignkeyconstraint.cpp

http://commits.kde.org/umbrello/e2fa89fa77f3f906b886ea0a570da9b626d58ca5
Comment 3 Christoph Feck 2013-10-23 21:04:24 UTC
Is it possible to backport this to 4.11 branch?
Comment 4 Ralf Habacker 2013-10-23 21:19:13 UTC
Git commit bcb2e07e99e12166c7fac3cb6ea871321de0eda1 by Ralf Habacker, on behalf of Joris Steyn.
Committed on 06/10/2013 at 17:57.
Pushed by habacker into branch 'KDE/4.11'.

Implement loading foreign key attributes from XMI
Related: bug 212779

Conflicts:
	umbrello/foreignkeyconstraint.cpp

M  +17   -10   umbrello/foreignkeyconstraint.cpp

http://commits.kde.org/umbrello/bcb2e07e99e12166c7fac3cb6ea871321de0eda1