openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1354210 - /openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
Date Tue, 26 Jun 2012 20:27:45 GMT
Author: ppoddar
Date: Tue Jun 26 20:27:44 2012
New Revision: 1354210

URL: http://svn.apache.org/viewvc?rev=1354210&view=rev
Log:
Check not only select but update as well

Modified:
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java

Modified: openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java?rev=1354210&r1=1354209&r2=1354210&view=diff
==============================================================================
--- openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
(original)
+++ openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
Tue Jun 26 20:27:44 2012
@@ -164,9 +164,9 @@ public class DistributedConnection imple
 
     public PreparedStatement prepareStatement(String arg0) throws SQLException {
 		// TODO: Big hack
-        if (arg0.startsWith(
-                "SELECT SEQUENCE_VALUE FROM OPENJPA_SEQUENCE_TABLE"))
+        if (arg0.indexOf("OPENJPA_SEQUENCE_TABLE") != -1) {
 			return master.prepareStatement(arg0);
+        }
 		DistributedPreparedStatement ret = new DistributedPreparedStatement(this);
 		for (Connection c : real) {
 			ret.add(c.prepareStatement(arg0));



Mime
View raw message