mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix for #235: Stored procedures not commited
This commit is contained in:
@@ -212,6 +212,11 @@ public interface SpiTransaction extends Transaction {
|
||||
*/
|
||||
public void flushBatchOnCascade();
|
||||
|
||||
/**
|
||||
* Mark the transaction explicitly as not being query only.
|
||||
*/
|
||||
public void markNotQueryOnly();
|
||||
|
||||
/**
|
||||
* Potentially escalate batch mode on saving or deleting a collection.
|
||||
*/
|
||||
@@ -222,4 +227,5 @@ public interface SpiTransaction extends Transaction {
|
||||
*/
|
||||
public void flushBatchOnCollection();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -76,13 +76,6 @@ public final class PersistRequestCallableSql extends PersistRequest {
|
||||
public void setGeneratedKey(Object idValue) {
|
||||
}
|
||||
|
||||
/**
|
||||
* False for CallableSql.
|
||||
*/
|
||||
public boolean useGeneratedKeys() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform post execute processing for the CallableSql.
|
||||
*/
|
||||
@@ -98,6 +91,8 @@ public final class PersistRequestCallableSql extends PersistRequest {
|
||||
|
||||
if (tableEvents != null && !tableEvents.isEmpty()) {
|
||||
transaction.getEvent().add(tableEvents);
|
||||
} else {
|
||||
transaction.markNotQueryOnly();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -141,7 +136,7 @@ public final class PersistRequestCallableSql extends PersistRequest {
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
pos++;
|
||||
BindParams.Param param = (BindParams.Param) list.get(i);
|
||||
BindParams.Param param = list.get(i);
|
||||
if (param.isOutParam()) {
|
||||
Object outValue = cstmt.getObject(pos);
|
||||
param.setOutValue(outValue);
|
||||
|
||||
@@ -361,6 +361,11 @@ public class JdbcTransaction implements SpiTransaction {
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markNotQueryOnly() {
|
||||
this.queryOnly = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
if (!isActive()) {
|
||||
|
||||
Reference in New Issue
Block a user