New issue 322 by igelin...@gmail.com: VB code setting Nullable property
http://code.google.com/p/dblinq2007/issues/detail?id=322
What steps will reproduce the problem?
1.Generate a .VB DataContext file with a Sqlite database
2.Create an entity of any class, and set one of its numeric property to 0
What is the expected output? What do you see instead?
I expect for the property to be set properly. Instead, the private
property value remains Nothing.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Here's an example :
<Column(Storage:="_insertionDate", Name:="insertionDate",
DbType:="INTEGER", AutoSync:=AutoSync.Never), _
DebuggerNonUserCode()> _
Public Property InsertionDate() As System.Nullable(Of Integer)
Get
Return Me._insertionDate
End Get
Set(value As System.Nullable(Of Integer))
If (_insertionDate <> value) Then
Me.OnInsertionDateChanging(value)
Me._insertionDate = value
Me.OnInsertionDateChanged()
End If
End Set
End Property
In this example, the value i'm trying to set is zero. The problem is in
the test if (_insertionDate <> value) Then.
Instead of returning True, this test compares Nothing (the current value of
the private field) with value (0). This test returns False, and the
propery is never set.
I just noticed that a similar issue have already been posted : Issue 249.
Sorry about that. Please discard this one.