Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNan Li2013-10-11 03:46:10 +0000
committerNan Li2013-10-11 03:46:10 +0000
commit5613fcf2ad5a51cc31baf295613c66042680da16 (patch)
tree0ecd5f7a5f59ee14cf42b550dbcd48e4af87956b
parent7caca3d4d9a6360c71c49e31dba886e0cdc4c9af (diff)
downloadwebtools.dali-5613fcf2ad5a51cc31baf295613c66042680da16.tar.gz
webtools.dali-5613fcf2ad5a51cc31baf295613c66042680da16.tar.xz
webtools.dali-5613fcf2ad5a51cc31baf295613c66042680da16.zip
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.java15
1 files changed, 10 insertions, 5 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..c8e592695f 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2013 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -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