You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key code causing the issue is that both session.QueueSqlCommand and session.Insert are in the same unit of work before the call to session.SaveChangesAsync
Marten.Exceptions.InvalidDocumentException
Could not determine an 'id/Id' field or property for requested document type Marten.Storage.StorageFeatures
at Marten.Schema.DocumentMapping.CompileAndValidate()
at Marten.Storage.DocumentTable..ctor(DocumentMapping mapping)
at Marten.Schema.DocumentSchema..ctor(DocumentMapping mapping)
at Marten.Schema.DocumentMapping.<.ctor>b__7_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Marten.Schema.DocumentMapping.get_Schema()
at Marten.Storage.StorageFeatures.AllActiveFeatures(IMartenDatabase database)+MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at Marten.Storage.MartenDatabase.BuildFeatureSchemas()
at Weasel.Core.Migrations.DatabaseBase`1.AllObjects()
at Weasel.Core.Migrations.DatabaseBase`1.AllSchemaNames()
at Marten.Storage.MartenDatabase.DeleteAllDocumentsAsync(CancellationToken ct)
at Marten.Storage.MartenDatabase.DeleteAllDocumentsAsync(CancellationToken ct)
at Marten.AdvancedOperations.ResetAllData(CancellationToken cancellation)
at MartenCustomStorageTest.ResetAllTest.WhenCustomTableIsUsedInABatchWithOtherDocumentResetAllShouldWork() in /Users/dgrozenok/RiderProjects/MartenCustomStorageTest/ResetAllTest.cs:line 21
at MartenCustomStorageTest.ResetAllTest.WhenCustomTableIsUsedInABatchWithOtherDocumentResetAllShouldWork() in /Users/dgrozenok/RiderProjects/MartenCustomStorageTest/ResetAllTest.cs:line 21
at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_0.<<InvokeTestMethodAsync>b__1>d.MoveNext() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:line 264
--- End of stack trace from previous location ---
at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:line 48
at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in /_/src/xunit.core/Sdk/ExceptionAggregator.cs:line 90
The text was updated successfully, but these errors were encountered:
Here is the test project with the failing unit test:
https://github.com/dgrozenok/MartenCustomStorageTest
The key code causing the issue is that both
session.QueueSqlCommand
andsession.Insert
are in the same unit of work before the call tosession.SaveChangesAsync
The exception in
store.Advanced.ResetAllData()
:The text was updated successfully, but these errors were encountered: