Skip to content

Commit d4b2ec3

Browse files
committed
Fixed off-target rename of AttributeValue column
The rename of `AttributeValue` to `AttributeRecord` (f41c551) inadvertently resulted in the `AttributeDataTable`'s `AttributeValue` column being renamed to `AttributeRecord`. But this actually represents the `AttributeRecord.Value` properties—or the `Attributes.AttributeValue` column in the database—and should not be renamed. Oops!
1 parent 98c73f8 commit d4b2ec3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

OnTopic.Data.Sql/SqlDataReaderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private static void SetIndexedAttributes(this IDataReader reader, TopicIndex top
237237
\-----------------------------------------------------------------------------------------------------------------------*/
238238
var topicId = reader.GetTopicId();
239239
var attributeKey = reader.GetString("AttributeKey");
240-
var attributeValue = reader.GetString("AttributeRecord");
240+
var attributeValue = reader.GetString("AttributeValue");
241241
var version = reader.GetVersion();
242242

243243
/*------------------------------------------------------------------------------------------------------------------------

OnTopic.Tests/Schemas/AttributesDataTable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public AttributesDataTable() : base("Attributes") {
5252
\-----------------------------------------------------------------------------------------------------------------------*/
5353
Columns.Add(new DataColumn() {
5454
DataType = typeof(string),
55-
ColumnName = "AttributeRecord",
55+
ColumnName = "AttributeValue",
5656
AllowDBNull = true
5757
});
5858

@@ -87,7 +87,7 @@ public void AddRow(int topicId, string attributeKey, string? attributeValue, Dat
8787

8888
row["TopicId"] = topicId;
8989
row["AttributeKey"] = attributeKey;
90-
row["AttributeRecord"] = attributeValue is null? DBNull.Value : attributeValue;
90+
row["AttributeValue"] = attributeValue is null? DBNull.Value : attributeValue;
9191
row["Version"] = version?? DateTime.UtcNow;
9292

9393
/*------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)