Skip to content

KeyProperties are not being persisted properly #252

@pgaliano

Description

@pgaliano

Given the following repos:

repository1 = TableRepository.Create(
storageAccount,
tableName: "Dependency",
partitionKey: d => d.Repository,
rowKey: d => $"{d.Name}-{d.Version}");

repository2 = TableRepository.Create(
storageAccount,
tableName: "Dependency",
partitionKey: d => d.Name,
rowKey: d => $"{d.Version}-{d.Repository}")

After doing:

var dependency = new Dependency(){Name="foo", Repository="bar", Version="1.0"};
await repository1.PutAsync(dependency);
await repository2.PutAsync(dependency);

The created items in the table are as follows:

PartitionKey|RowKey|Name|Version
bar|foo-1.0|foo|null|1.0
foo|1.0-bar|foo|null|1.0

Expected:
PartitionKey|RowKey|Name|Repository|Version
bar|foo-1.0|foo|null|1.0
foo|1.0-bar|null|bar|1.0

Back this issue
Back this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions