parent
e34b98033e
commit
0a3a65ffb0
@ -535,7 +535,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
|||||||
self.undo_history_callback = None
|
self.undo_history_callback = None
|
||||||
self.modified = 0
|
self.modified = 0
|
||||||
self.transaction = None
|
self.transaction = None
|
||||||
self.abort_possible = False
|
self.abort_possible = True
|
||||||
self._bm_changes = 0
|
self._bm_changes = 0
|
||||||
self.has_changed = False
|
self.has_changed = False
|
||||||
self.surname_list = []
|
self.surname_list = []
|
||||||
|
@ -231,6 +231,10 @@ class DBAPI(DbGeneric):
|
|||||||
_LOG.debug(" %sDBAPI %s transaction begin for '%s'",
|
_LOG.debug(" %sDBAPI %s transaction begin for '%s'",
|
||||||
"Batch " if transaction.batch else "",
|
"Batch " if transaction.batch else "",
|
||||||
hex(id(self)), transaction.get_description())
|
hex(id(self)), transaction.get_description())
|
||||||
|
if transaction.batch:
|
||||||
|
# A batch transaction does not store the commits
|
||||||
|
# Aborting the session completely will become impossible.
|
||||||
|
self.abort_possible = False
|
||||||
self.transaction = transaction
|
self.transaction = transaction
|
||||||
self.dbapi.begin()
|
self.dbapi.begin()
|
||||||
return transaction
|
return transaction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user