Unknown discriminator value 'MyEvent'

后端 未结 2 1429
梦毁少年i
梦毁少年i 2020-12-20 17:20

Using the MongoDB persistance engine in joliver/EventStore causing the error Unknown discriminator value \'MyEvent\'. The issue is only caused when I try to loa

2条回答
  •  一整个雨季
    2020-12-20 17:41

    Try to register your objects (itself the event messages as well as the subjects of the EventStore payloads) using the BsonClassMap.RegisterClassMap method. It seems EventStore's mongo extension handles the string payloads well, but not the deserialized objects ... at least registering the classed was the solution in my case.

提交回复
热议问题