diff --git a/src/Marten/Events/Fetching/FetchInlinedPlan.cs b/src/Marten/Events/Fetching/FetchInlinedPlan.cs index bc14811752..13bd26ccf1 100644 --- a/src/Marten/Events/Fetching/FetchInlinedPlan.cs +++ b/src/Marten/Events/Fetching/FetchInlinedPlan.cs @@ -100,7 +100,7 @@ public async Task> FetchForWriting(DocumentSessionBase sessio IDocumentStorage storage = null; if (session.Options.Events.UseIdentityMapForAggregates) { - storage = (IDocumentStorage)session.Options.Providers.StorageFor(); + storage = session.Options.ResolveCorrectedDocumentStorage(DocumentTracking.IdentityOnly); // Opt into the identity map mechanics for this aggregate type just in case // you're using a lightweight session session.UseIdentityMapFor();