Hi,
I 've spotted similar issue and I added it to JIRA as a bug.
One way to solve it is to express negation via NOT(), so you can do
add where !b.Deleted instead of b.Deleted == false. I belive this is
only one possible workaround for now.

On 9 Sty, 20:27, "Joe.Carr" <[email protected]> wrote:
> 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].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to