Revision: 3910
Author: [email protected]
Date: Fri Aug 20 13:27:42 2010
Log: Reverted Thomas' change that caused reverse engineering a parent table
to not create column mappings to its child tables until the child tables
are reverse engineered.
This change was causing a whole bunch of exceptions. More testing and
tweaking needs to be done for this fix.
http://code.google.com/p/power-architect/source/detail?r=3910
Modified:
/trunk/src/main/java/ca/sqlpower/architect/ProjectLoader.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/SwingUIProjectLoader.java
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/ProjectLoader.java Fri Aug
20 09:35:41 2010
+++ /trunk/src/main/java/ca/sqlpower/architect/ProjectLoader.java Fri Aug
20 13:27:42 2010
@@ -842,16 +842,6 @@
if (pkColumnId != null) {
cmap.setPkColumn((SQLColumn)
sqlObjectLoadIdMap.get(pkColumnId));
}
-
- String fkTableId = attributes.getValue("fk-table");
- if (fkTableId != null) {
- cmap.setFkTable((SQLTable)
sqlObjectLoadIdMap.get(fkTableId));
- }
-
- String fkColName = attributes.getValue("fk-col-name");
- if (fkColName != null) {
- cmap.setFkColName(fkColName);
- }
return cmap;
}
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/SwingUIProjectLoader.java
Fri Aug 20 09:35:41 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/SwingUIProjectLoader.java
Fri Aug 20 13:27:42 2010
@@ -1481,8 +1481,6 @@
type = "column-mapping"; //$NON-NLS-1$
propNames.put("pk-column-ref",
sqlObjectSaveIdMap.get(((SQLRelationship.ColumnMapping) o).getPkColumn()));
//$NON-NLS-1$
propNames.put("fk-column-ref",
sqlObjectSaveIdMap.get(((SQLRelationship.ColumnMapping) o).getFkColumn()));
//$NON-NLS-1$
- propNames.put("fk-col-name", ((SQLRelationship.ColumnMapping)
o).getFkColName()); //$NON-NLS-1$
- propNames.put("fk-table",
sqlObjectSaveIdMap.get(((SQLRelationship.ColumnMapping) o).getFkTable()));
//$NON-NLS-1$
} else if (o instanceof SQLIndex) {
id = "IDX"+sqlObjectSaveIdMap.size(); //$NON-NLS-1$
type = "index"; //$NON-NLS-1$