Revision: 3470
Author: silva.josemanuel1
Date: Thu Apr 22 14:28:36 2010
Log: Fixed relationship connection problems when multiple clients reverse
engineer the same database. The problem happened because the tableNames Set
only consisted of tables that were locally created.
http://code.google.com/p/power-architect/source/detail?r=3470
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPen.java
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPen.java Wed Apr
14 09:46:11 2010
+++ /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPen.java Thu Apr
22 14:28:36 2010
@@ -1213,6 +1213,16 @@
public Set<String> getTableNames () {
return tableNames;
}
+
+ /**
+ * Reconstructs the set of table names by going through all the tables.
+ */
+ public void resetTableNames() {
+ tableNames.clear();
+ for (TablePane tp : contentPane.getChildren(TablePane.class)) {
+ tableNames.add(tp.getModel().getName().toLowerCase());
+ }
+ }
/**
* Returns the number of components in this PlayPen's
@@ -1564,6 +1574,7 @@
// reset iterator
Iterator<SQLObject> soIt =
sqlObjects.iterator();
+ resetTableNames();
while (soIt.hasNext() && !isCancelled()) {
SQLObject someData = soIt.next();
DuplicateProperties duplicateProperties =
ASUtils.createDuplicateProperties(getSession(), someData);
--
Subscription settings:
http://groups.google.com/group/architect-commits/subscribe?hl=en