Hello,
Thanks for the reply. I updated to the most recent code, and it
appears the problem still exists in Postgres. I slightly modified the
test fixture for 2441, by adding boolean property to the model. So now
I can check :
var query1 = session.Query<Person>().Where(p => p.IsAngry == true);
Assert.That(query1.Count(), Is.EqualTo(1));
The test succeeds, but the SQL generated is :
select
cast(count(*) as int4) as col_0_0_
from
Person person0_
where
case
when person0_.IsAngry=TRUE then TRUE
else FALSE
end=case
when :p0=TRUE then TRUE
else FALSE
end;
:p0 = True [Type: Boolean (0)]
I tried stepping through to find where this case statement is
generated, but haven't been able to track it down as yet.
Could anyone point me in the right direction? Thanks again for the
help...
-Joe
On Jan 9, 5:36 pm, José F. Romaniello <[email protected]> wrote:
> not sure, but i think it was fixed
> recently:http://216.121.112.228/browse/NH-2456
>
> 2011/1/9 Joe.Carr <[email protected]>
>
>
>
>
>
>
>
> > The linq query :
>
> > var query = (from b in session.Query<Entity>()
> > where b.Deleted == false
> > select b);
>
> > return query.Count();
>
> > produces (PostGreSQL dialect):
>
> > select cast(count(* ) as int4) as col_0_0_
> > from "entity" entity0_
> > where case
> > when entity0_.Deleted = TRUE then 1
> > else 0
> > end = case
> > when 0 /* :p0 */ = 1 then 1
> > else 0
> > end
>
> > Any idea how I might be able to get it to read :
>
> > select cast(count(* ) as int4) as col_0_0_
> > from "entity" entity0_
> > where entity0_.Deleted = FALSE
>
> > The hbm produced by Fluent NHibernate for the Deleted column is :
>
> > <property name="Deleted" type="System.Boolean, mscorlib,
> > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
> > <column name="Deleted" />
> > </property>
>
> > Thanks beforehand for any help!
> > ?
>
> > --
> > 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]<nhusers%[email protected]
> > >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
--
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.