mirror of https://github.com/apache/openjpa.git
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
This commit is contained in:
parent
4659638a1d
commit
f3e64797b2
|
@ -164,9 +164,9 @@ public class DistributedConnection implements Connection {
|
|||
|
||||
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));
|
||||
|
|
Loading…
Reference in New Issue