Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 155624 | Differences between
and this patch

Collapse All | Expand All

(-)kdesdk-3.5.5.orig/umbrello/umbrello/codegenerators/sqlwriter.cpp (-8 / +9 lines)
Lines 86-99 Link Here
86
    UMLAssociationList aggregations = c->getAggregations();
86
    UMLAssociationList aggregations = c->getAggregations();
87
    if( forceSections() || !aggregations.isEmpty() ) {
87
    if( forceSections() || !aggregations.isEmpty() ) {
88
        for(UMLAssociation* a = aggregations.first(); a; a = aggregations.next()) {
88
        for(UMLAssociation* a = aggregations.first(); a; a = aggregations.next()) {
89
            if( a->getObject(Uml::A)->getID() != c->getID() ) {
89
            if( a->getObject(Uml::A)->getID() == c->getID() && a->getObject(Uml::B)->getID() != c->getID() )
90
90
		continue;
91
                sql << m_indentation << "," << m_endl << m_indentation
91
	    if ( a->getRoleName(Uml::B) != "" && a->getRoleName(Uml::B) != "") {
92
                << "CONSTRAINT " << a->getName() << " FOREIGN KEY ("
92
            	    sql << m_indentation << "," << m_endl << m_indentation
93
                << a->getRoleName(Uml::B) << ") REFERENCES "
93
            	    << "CONSTRAINT " << a->getName() << " FOREIGN KEY ("
94
                << a->getObject(Uml::A)->getName()
94
            	    << a->getRoleName(Uml::B) << ") REFERENCES "
95
                << " (" << a->getRoleName(Uml::A) << ")";
95
            	    << a->getObject(Uml::A)->getName()
96
            }
96
            	    << " (" << a->getRoleName(Uml::A) << ")";
97
	    }
97
        }
98
        }
98
    }
99
    }
99
100

Return to bug 155624