From da5506df786d5a26763e85189b33bfd92f1d76d5 Mon Sep 17 00:00:00 2001 From: johncurrier Date: Wed, 1 Oct 2008 22:32:27 +0000 Subject: [PATCH] Exclude remote tables from the lists of insertion/deletion ordered tables because there's not much we can do with them (other than cause confusion) --- src/net/sourceforge/schemaspy/SchemaSpy.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/net/sourceforge/schemaspy/SchemaSpy.java b/src/net/sourceforge/schemaspy/SchemaSpy.java index e4a7f00..842fb33 100755 --- a/src/net/sourceforge/schemaspy/SchemaSpy.java +++ b/src/net/sourceforge/schemaspy/SchemaSpy.java @@ -46,7 +46,13 @@ public List sortTablesByRI(Collection recursiveCons // first pass to gather the 'low hanging fruit' for (Iterator
iter = remainingTables.iterator(); iter.hasNext(); ) { Table table = iter.next(); - if (table.isLeaf() && table.isRoot()) { + if (table.isRemote()) { + // ignore remote tables since there's no way to deal with them + table.unlinkParents(); + table.unlinkChildren(); + iter.remove(); + } else if (table.isLeaf() && table.isRoot()) { + // floater, so add it to 'unattached' unattached.add(table); iter.remove(); }