Skip to content

EventFlow.MsSql: AggregateId is not set on ReadModel #1141

@JMolenkamp

Description

@JMolenkamp

When deriving from IMssqlReadModel, the AggregateId property is set, but usage of this interface is obsolete. However, in that case, no equivalent functionality exists, i.e. the property annotated with SqlReadModelIdentityColumnAttribute (or AggregateId as fallback) is never populated.

readModel = await _readModelFactory.CreateAsync(readModelId, cancellationToken)
.ConfigureAwait(false);
mssqlReadModel = readModel as IMssqlReadModel;
if (mssqlReadModel != null)
{
mssqlReadModel.AggregateId = readModelId;
mssqlReadModel.CreateTime = readModelUpdate.DomainEvents.First().Timestamp;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions