Skip to content

Commit 3dd56a2

Browse files
David EllingsworthDavid Ellingsworth
authored andcommitted
GH-3530: Rename the Value column to DataValue to avoid conflicts with reserved words.
1 parent 75c092b commit 3dd56a2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/NHibernate.Test/Async/NHSpecificTest/GH3530/Fixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private string GetQualifiedName(string catalog, string schema, string name)
126126
{
127127
var entity = new U()
128128
{
129-
Value = expectedValue
129+
DataValue = expectedValue
130130
};
131131

132132
id = await (session.SaveAsync(entity, cancellationToken));
@@ -139,7 +139,7 @@ private string GetQualifiedName(string catalog, string schema, string name)
139139
{
140140
var entity = await (session.GetAsync<U>(id, cancellationToken));
141141

142-
assert(expectedValue, entity.Value);
142+
assert(expectedValue, entity.DataValue);
143143
}
144144
}
145145

src/NHibernate.Test/NHSpecificTest/GH3530/Entities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public abstract class Entity
1414

1515
public abstract class Entity<T>:Entity where T : struct
1616
{
17-
public virtual T Value { get; set; }
17+
public virtual T DataValue { get; set; }
1818
}
1919

2020
public class IntegerEntity : Entity<int> { }

src/NHibernate.Test/NHSpecificTest/GH3530/Fixture.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private void CreateTable(string name)
5858

5959
// Generate columns
6060
sb.Append($"Id {guidType}, ");
61-
sb.Append($"Value {stringType}");
61+
sb.Append($"DataValue {stringType}");
6262

6363
// Add the primary key contraint for the identity column
6464
sb.Append($", {Dialect.PrimaryKeyString} ( Id )");
@@ -114,7 +114,7 @@ private void PerformTest<T, U>(CultureInfo from, CultureInfo to, T expectedValue
114114
{
115115
var entity = new U()
116116
{
117-
Value = expectedValue
117+
DataValue = expectedValue
118118
};
119119

120120
id = session.Save(entity);
@@ -127,7 +127,7 @@ private void PerformTest<T, U>(CultureInfo from, CultureInfo to, T expectedValue
127127
{
128128
var entity = session.Get<U>(id);
129129

130-
assert(expectedValue, entity.Value);
130+
assert(expectedValue, entity.DataValue);
131131
}
132132
}
133133

src/NHibernate.Test/NHSpecificTest/GH3530/Mappings.hbm.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
namespace="NHibernate.Test.NHSpecificTest.GH3530">
44
<class name="IntegerEntity">
55
<id name="Id" generator="guid.comb" />
6-
<property name="Value" column="Value"/>
6+
<property name="DataValue" column="DataValue"/>
77
</class>
88
<class name="DateTimeEntity">
99
<id name="Id" generator="guid.comb" />
10-
<property name="Value" column="Value"/>
10+
<property name="DataValue" column="DataValue"/>
1111
</class>
1212
<class name="DoubleEntity">
1313
<id name="Id" generator="guid.comb" />
14-
<property name="Value" column="Value"/>
14+
<property name="DataValue" column="DataValue"/>
1515
</class>
1616
<class name="DecimalEntity">
1717
<id name="Id" generator="guid.comb" />
18-
<property name="Value" column="Value"/>
18+
<property name="DataValue" column="DataValue"/>
1919
</class>
2020
</hibernate-mapping>

0 commit comments

Comments
 (0)