Nullable types

1 view
Skip to first unread message

acl123

unread,
Nov 17, 2009, 8:21:13 PM11/17/09
to NhLambdaExtensionsUsers
Hi there,
Does this library support nullable types? I am having troubles with a
query like this:

Session.CreateCriteria<FooBar>()
.Add<FooBar>(x => x.Year == 5)
.List();

In this case FooBar.Year is a nullable int, but I receive a conversion
exception.

Richard Brown (gmail)

unread,
Nov 18, 2009, 3:30:59 AM11/18/09
to NhLambdaExtensionsUsers
Hi Andrew,

I've had a look and I don't see any tests for that ... so it might not.

I'll get right on it.

Cheers,
Richard

--------------------------------------------------
From: "acl123" <andrewc...@gmail.com>
Sent: Wednesday, November 18, 2009 1:21 AM
To: "NhLambdaExtensionsUsers" <nhlambdaext...@googlegroups.com>
Subject: Nullable types

Richard Brown (gmail)

unread,
Nov 18, 2009, 4:45:13 AM11/18/09
to NhLambdaExtensionsUsers
Hi Andrew,

I'm adding some tests for nullable types, however nullable int (int?) seems
to work ok.

The example you gave works fine on my build, can you confirm which version
you're using?

Cheers,
Richard

--------------------------------------------------
From: "Richard Brown (gmail)" <fluk...@googlemail.com>
Sent: Wednesday, November 18, 2009 8:30 AM
To: "NhLambdaExtensionsUsers" <nhlambdaext...@googlegroups.com>
Subject: Re: Nullable types

Richard Brown (gmail)

unread,
Nov 18, 2009, 5:38:03 AM11/18/09
to NhLambdaExtensionsUsers
In addition, I've added some tests (and a couple of fixes) for nullable
booleans and enums. The new version is 1.0.9.0:

http://code.google.com/p/nhlambdaextensions/downloads/list


--------------------------------------------------
From: "Richard Brown (gmail)" <fluk...@googlemail.com>
Sent: Wednesday, November 18, 2009 9:45 AM
Reply all
Reply to author
Forward
0 new messages