From 3052c2a74213911ed562074e634415737969af1c Mon Sep 17 00:00:00 2001 From: Diego Plentz Date: Wed, 16 Jul 2008 18:04:53 +0000 Subject: [PATCH] [HHH-1697] OracleDialect fails to recognize sequence accessible through syonyms when validating schema git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14938 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../main/java/org/hibernate/dialect/Oracle8iDialect.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java b/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java index 15c0ba86fe..1de3513bca 100644 --- a/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java +++ b/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java @@ -325,7 +325,12 @@ public class Oracle8iDialect extends Dialect { } public String getQuerySequencesString() { - return "select sequence_name from user_sequences"; + return "select sequence_name from all_sequences " + + "union " + + "select synonym_name " + + " from all_synonyms us, all_sequences asq " + + " where asq.sequence_name = us.table_name" + + " and asq.sequence_owner = us.table_owner"; } public String getSelectGUIDString() {