Skip to content

Commit

Permalink
Fixed the check for changes in the session's HasChange()
Browse files Browse the repository at this point in the history
  • Loading branch information
AKlaus committed Aug 15, 2021
1 parent 20bc21a commit ef34793
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ public bool HasChanges()
{
// Use direct property, so we don't open a new session too early
return _dbSession?.Advanced.HasChanges == true
// Check if there is a PATCH request
// if a deferred patch query exist
|| _deferredPatchQueries.Any()
// if there is a PATCH request in the underlining session
|| _dbSession?.Advanced is InMemoryDocumentSessionOperations { DeferredCommandsCount: > 0 };

This comment has been minimized.

Copy link
@ayende
}

Expand Down

0 comments on commit ef34793

Please sign in to comment.