Skip to content

when using aggregates the classes have to be registered #22

@ElectNewt

Description

@ElectNewt

when implementing event sourcing (and aggregates) with mongo, the classes that are "event" needs to be registered with BsonClassMap.RegisterClassMap<T>(); figure it out a way to not need this registration or do the registration abutomatically, as the events should be identificable by IApply<T>
Error Message: error occurred while deserializing the Content property of class Distribt.Shared.EventSourcing.AggregateChangeDto: Unknown discriminator value 'OrderCreated' where OrderCreated is T

Workarounds:

  • Add all the events under a .RegisterClassMap
  • store in the AggregateType the full type(namespace, etc) instead of only the name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions