Skip to content

Commit 48ee983

Browse files
committed
Set shouldDelayIdentityInserts = !requiresImmediateIdAccess
1 parent efb5284 commit 48ee983

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/NHibernate/Async/Event/Default/AbstractSaveEventListener.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ protected virtual async Task<object> PerformSaveOrReplicateAsync(object entity,
186186

187187
object id = key == null ? null : key.Identifier;
188188

189-
bool inTxn = source.ConnectionManager.IsInActiveTransaction;
190-
bool shouldDelayIdentityInserts = !inTxn && !requiresImmediateIdAccess;
189+
bool shouldDelayIdentityInserts = !requiresImmediateIdAccess;
191190

192191
// Put a placeholder in entries, so we don't recurse back and try to save() the
193192
// same object again. QUESTION: should this be done before onSave() is called?

src/NHibernate/Event/Default/AbstractSaveEventListener.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ protected virtual object PerformSaveOrReplicate(object entity, EntityKey key, IE
211211

212212
object id = key == null ? null : key.Identifier;
213213

214-
bool inTxn = source.ConnectionManager.IsInActiveTransaction;
215-
bool shouldDelayIdentityInserts = !inTxn && !requiresImmediateIdAccess;
214+
bool shouldDelayIdentityInserts = !requiresImmediateIdAccess;
216215

217216
// Put a placeholder in entries, so we don't recurse back and try to save() the
218217
// same object again. QUESTION: should this be done before onSave() is called?

0 commit comments

Comments
 (0)