Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNan Li2013-11-15 02:51:47 +0000
committerNan Li2013-11-15 02:51:47 +0000
commit4a280d3c36e9df165dd270e519ceab49bbbce229 (patch)
tree4a0f7872feb8e8b50e2589896cbf1be11a8f211e
parentf16ae2408cb902ff69a12d72c3cec9d869ee3923 (diff)
downloadwebtools.dali-4a280d3c36e9df165dd270e519ceab49bbbce229.tar.gz
webtools.dali-4a280d3c36e9df165dd270e519ceab49bbbce229.tar.xz
webtools.dali-4a280d3c36e9df165dd270e519ceab49bbbce229.zip
Bug 417120 - [hotbug][regression]JPT Catalog layer should be optional
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.db/src/org/eclipse/jpt/jpa/db/internal/driver/FauxCatalogStrategy.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.db/src/org/eclipse/jpt/jpa/db/internal/driver/FauxCatalogStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.db/src/org/eclipse/jpt/jpa/db/internal/driver/FauxCatalogStrategy.java
index 507d5cb573..39e4ef195c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.db/src/org/eclipse/jpt/jpa/db/internal/driver/FauxCatalogStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.db/src/org/eclipse/jpt/jpa/db/internal/driver/FauxCatalogStrategy.java
@@ -42,11 +42,16 @@ class FauxCatalogStrategy
return Collections.emptyList();
}
+ @SuppressWarnings("unchecked")
public List<Schema> getSchemas() {
- Catalog fauxCatalog = this.getFauxCatalog();
- @SuppressWarnings("unchecked")
- List<Schema> schemas = fauxCatalog.getSchemas();
- return schemas;
+ // 308947 - hack to support old IBM DTP/RDB extension for Oracle
+ List<Catalog> catalogs = database.getCatalogs();
+ // if there are no catalogs, the database must hold the schemata directly
+ if ((catalogs == null) || catalogs.isEmpty()) {
+ return database.getSchemas();
+ }
+
+ return this.getFauxCatalog().getSchemas();
}
private Catalog getFauxCatalog() {

Back to the top