From 15f6ece8199e04be48d1f452b523e291f17c9b7a Mon Sep 17 00:00:00 2001 From: Catalina Wei Date: Wed, 27 Aug 2008 22:53:28 +0000 Subject: [PATCH] OPENJPA-706 Changes for supporting DB generated version git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@689649 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/jdbc/kernel/ConstraintUpdateManager.java | 9 +++++++-- .../java/org/apache/openjpa/jdbc/sql/DBDictionary.java | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ConstraintUpdateManager.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ConstraintUpdateManager.java index 8fed879bb..70e0270b8 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ConstraintUpdateManager.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ConstraintUpdateManager.java @@ -344,11 +344,16 @@ public class ConstraintUpdateManager // flush delete updates to null fks, then all rows in order, then // the insert updates to set circular fk values - flush(deleteUpdates, psMgr); Collection nodes = dfa.getSortedNodes(); + flush(deleteUpdates, nodes, psMgr); + flush(insertUpdates, psMgr); + } + + protected void flush(Collection deleteUpdates, Collection nodes, + PreparedStatementManager psMgr) { + flush(deleteUpdates, psMgr); for (Iterator itr = nodes.iterator(); itr.hasNext();) psMgr.flush((RowImpl) itr.next()); - flush(insertUpdates, psMgr); } /** diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index 30d474c0a..73ee3142c 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -237,6 +237,7 @@ public class DBDictionary public boolean supportsModOperator = false; public boolean supportsXMLColumn = false; public boolean reportsSuccessNoInfoOnBatchUpdates = false; + public boolean supportsSelectFromFinalTable = false; /** * Some Databases append whitespace after the schema name