mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-09-25 11:32:07 +00:00
call request.markNotQueryOnly
This commit is contained in:
@@ -148,6 +148,13 @@ public abstract class PersistRequest extends BeanRequest implements BatchPostExe
|
||||
persistCascade = transaction.isPersistCascade();
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the underlying transaction as not being query only.
|
||||
*/
|
||||
public void markNotQueryOnly() {
|
||||
transaction.markNotQueryOnly();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the type of this request. One of INSERT, UPDATE, DELETE, UPDATESQL or CALLABLESQL.
|
||||
*/
|
||||
|
||||
@@ -87,7 +87,7 @@ public final class DefaultPersister implements Persister {
|
||||
private int executeOrQueue(PersistRequest request) {
|
||||
try {
|
||||
request.initTransIfRequired();
|
||||
request.transaction().markNotQueryOnly();
|
||||
request.markNotQueryOnly();
|
||||
int rc = request.executeOrQueue();
|
||||
request.commitTransIfRequired();
|
||||
return rc;
|
||||
@@ -384,7 +384,7 @@ public final class DefaultPersister implements Persister {
|
||||
req.checkDraft();
|
||||
try {
|
||||
req.initTransIfRequiredWithBatchCascade();
|
||||
req.transaction().markNotQueryOnly();
|
||||
req.markNotQueryOnly();
|
||||
if (req.isReference()) {
|
||||
// its a reference so see if there are manys to save...
|
||||
if (req.isPersistCascade()) {
|
||||
@@ -432,7 +432,7 @@ public final class DefaultPersister implements Persister {
|
||||
}
|
||||
try {
|
||||
req.initTransIfRequiredWithBatchCascade();
|
||||
req.transaction().markNotQueryOnly();
|
||||
req.markNotQueryOnly();
|
||||
insert(req);
|
||||
req.resetDepth();
|
||||
req.commitTransIfRequired();
|
||||
@@ -565,7 +565,7 @@ public final class DefaultPersister implements Persister {
|
||||
}
|
||||
try {
|
||||
req.initTransIfRequiredWithBatchCascade();
|
||||
req.transaction().markNotQueryOnly();
|
||||
req.markNotQueryOnly();
|
||||
int rows = delete(req);
|
||||
if (draftReq != null) {
|
||||
// delete the 'draft' bean ('live' bean deleted first)
|
||||
|
||||
Reference in New Issue
Block a user