No, you can't.

2009/6/4 Noel Hoo <[email protected]>

> Just wondering if this is possible:
> * *
> I have a DetachedCriteria and want to add a SubQuery to it.
> Pretty much a sql where clause, "where productID in (...)"
>
> The SubQuery is implemented using HQL.
> Just wondering if I can set the projection on the HQL Subquery and used it
> with my DetachedCriteria.
> *
> HQL subquery*
> ..
> string sql = "select p.Id from Product2 p"
>                         + " left join p.LinkedProducts as slp" +
>                          "  WITH slp.ShopId in (:shopIds) and
> slp.FormatGroupId=1 and slp.ShopProductStatusId=1" +
>                          " group by p.Id having (Count(distinct slp.Id) <
> :numOfShopIds)";
> ...
>
> Been banging my head against this for a while. Let me know if my
> explanation of the problem is unclear :)
>
>
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
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