Hello
I am exploring LINQ in NHib 3.0b2 using MSSQL 2008 now and have found
next situation:
var q = from x in ses.Query<TestEntity>() where x.FldInt == 1 select
x;
FldInt has type int? and mapped to nullable column in table
Mapping done using Fluent NHibernate
..............
Map(x => x.FldInt).Column("ZTR_FIELD_INT");
when executing this query error happens in SQL
............... from ZTR_ENT testentity0_ where
(testentity0_.ZTR_FIELD_INT is null) and (@p0 is null) or
testentity0_.ztr_field_i...@p1',N'@p0 int',@p0=1
It seems that @p1 must be named @p0 or @p1 must be declared and
passed to SQL
So the question
How to filter by nullable column using LINQ?
It seems that this connected with
http://groups.google.com/group/nhusers/browse_thread/thread/f94f5c035e676e47
Any ideas?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.