Permalink
Browse files

Check not only select but update as well

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1354210 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 4659638 commit f3e64797b24b92a012ed80c341d9b4385bdc1629 Pinaki Poddar committed Jun 26, 2012
View
4 openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
@@ -164,9 +164,9 @@ public CallableStatement prepareCall(String arg0, int arg1, int arg2,
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));

0 comments on commit f3e6479

Please sign in to comment.