Issue 322 in dblinq2007: VB code setting Nullable property

0 views
Skip to first unread message

dblin...@googlecode.com

unread,
Sep 20, 2011, 11:02:23 PM9/20/11
to dblin...@googlegroups.com
Status: New
Owner: ----

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.


dblin...@googlecode.com

unread,
Sep 22, 2011, 4:54:53 PM9/22/11
to dblin...@googlegroups.com

Comment #1 on issue 322 by igelin...@gmail.com: VB code setting Nullable
property
http://code.google.com/p/dblinq2007/issues/detail?id=322

I just noticed that a similar issue have already been posted : Issue 249.
Sorry about that. Please discard this one.

Reply all
Reply to author
Forward
0 new messages