One or more errors occurred. (unordered field Item) - This is probably more a question.
See original GitHub issueHi there! I am looking for an event store which will be friendly to F#, so the one written in F# should be perfect ;D I tried to use it with postgres + marten, but I am failing to read events if they are represented by discriminated union. Let me just give You the test that I run;
module Tests
open System
open System.Threading.Tasks
open Xunit
open CosmoStore.Marten
open CosmoStore
open FsUnit.Xunit
type DummyEvent = { IncrementedBy: int }
type DummyEvent2 = { Date: DateTime }
type Dummies =
| Dummy1 of DummyEvent
| Dummy2 of DummyEvent2
[<Fact>]
let ``Saving and reading`` () =
// Arrange
let streamId = "MyAmazingStream"
let config: Configuration =
{ Host = "localhost"
Username = "postgres"
Password = "Secret!Passw0rd"
Database = "cativity" }
let es = EventStore.getEventStore config
let eventWrite: EventWrite<Dummies> =
{ Id = Guid.NewGuid()
CorrelationId = None
CausationId = None
Name = nameof DummyEvent
Data = Dummies.Dummy1{ IncrementedBy = 4 }
Metadata = None }
// Act + Assert
[ eventWrite ]
|> es.AppendEvents streamId ExpectedVersion.Any
|> Async.AwaitTask
|> Async.RunSynchronously
|> ignore
let events =
EventsReadRange.AllEvents
|> es.GetEvents "MyAmazingStream"
|> Async.AwaitTask
|> Async.RunSynchronously
[ events.Head.Data ] |> should equal [ eventWrite.Data ]
The test breaks on event read.
System.AggregateException
One or more errors occurred. (unordered field Item)
So it is quite mysterious. Probably I am doing something wrong.
Without DU it works just OK - so if we will use EventWrite<DummyEvent>
Any hints? Thanks guys in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
SSRS Query execution failed for dataset - sql server
I enabled remote errors to pinpoint the problem. I identified that a column in a particular dataset (one of my views) was throwing...
Read more >Top 10 questions and answers about SQL Server Indexes
In this blog post you will find top 10 most asked questions and a few that should be asked but often are not,...
Read more >How To Fix pandas.parser.CParserError: Error tokenizing ...
The most obvious solution to the problem, is to fix the data file manually by removing the extra separators in the lines causing...
Read more >Common Store Errors
This error message means ShipStation has communicated with your store but the data is missing one or more required values. Possible solutions:.
Read more >Chapter 3. Data, Tables, and Database Design
Put repeated items into separate tables. If your customer has two or more phone numbers, you should create distinct phone number fields in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup, any improvement is more than welcome. 😃
cc/ @Dzoukr .
I guess I m ok with improvement. I haven’t touch the code since ages. These seems good improvement.