mappings
2011/3/9 Kotuadam <[email protected]>
> In the following LINQ query, notice the item => item.Offers != null.
> This is not being converted to sql string correctly.
>
> public IQueryable<Item> FindOrders()
> {
>
> return
> repository
> .Where(item => item.Offers != null &&
> item.Offers.Count() <= 0)
> .OrderBy(item => item.ItemPostDate);
> }
>
> The generated SQL for the above query is and notice again the ( . is
> not null) part in the sql string that generated.
>
> select
> cast(count(*) as INT) as col_0_0_
> from dbo.Item item0_ left outer join dbo.[User] user1_ on
> item0_.User_id=user1_.Id,
> dbo.Offer offers2_
> where item0_.Id=offers2_.Item_id and
> item0_.ItemStatus='Active' /* @p0 */ and
> item0_.LastModifyDate>='2010-12-09T14:06:09.00' /* @p1 */
> and
> ( . is not null)
> and
> (select cast(count(*) as INT)
>
> from dbo.Offer offers3_
> where item0_.Id=offers3_.Item_id)
> <=0 /* @p2 */
>
>
> I think also this is a bug. Please advise.
>
> --
> 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.
>
>
--
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.