Bug 212779

Summary: Entity Relation Model foreign key constraints not saved and/or reloaded
Product: [Applications] umbrello Reporter: David M. St. Pierre <stpierre>
Component: generalAssignee: Joris Steyn <kde>
Status: RESOLVED FIXED    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.3
Attachments: Test case where fkey constraints not saved

Description David M. St. Pierre 2009-11-02 18:31:16 UTC
Version:           2.3.2 (using KDE 4.3.2)
Compiler:          gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) 
OS:                Linux
Installed from:    Fedora RPMs

Target language is PostgreSQL. Create an entity having an attribute of type integer. Create primary key constraint on this attribute. Create second entity having an attribute of type integer. Create foreign key constraint on this attribute referencing primary key of first entity. Save the model. Close the model. Re-open the model. Foreign key constraint of second attribute no longer references the primary key field of first entity. As a result generates incorrect SQL.

If the SQL is generated before the model file is closed, it is generated correctly.
Comment 1 David M. St. Pierre 2009-11-02 18:37:27 UTC
Created attachment 38033 [details]
Test case where fkey constraints not saved
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 292238

M  +15   -8    umbrello/foreignkeyconstraint.cpp

http://commits.kde.org/umbrello/e2fa89fa77f3f906b886ea0a570da9b626d58ca5
Comment 3 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 292238

Conflicts:
	umbrello/foreignkeyconstraint.cpp

M  +17   -10   umbrello/foreignkeyconstraint.cpp

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