Yes. The only other option i know of using Criteria is a Filter that you
have to enable/disable per session. For individual queries it feels less
than ideal, better suited for global things.

HQL's your best bet.

-Francois

On Wed, Oct 20, 2010 at 8:29 AM, Patrik Lowendahl <
[email protected]> wrote:

> So basically a HQL Query is needed?
>
>
> On Wed, Oct 20, 2010 at 2:15 PM, Fabio Maulo <[email protected]> wrote:
>
>> from A a left join a.B b with b.Name = "Name1" or b.Name = "Name2"
>>
>>  On Wed, Oct 20, 2010 at 8:58 AM, Patrik Lowendahl <
>> [email protected]> wrote:
>>
>>>   Hi,
>>>
>>> I'm trying to spin my head around getting this T-SQL  query into a
>>> criteria/hql in NH 2.1:
>>>
>>> select * from A
>>> inner join B where B.ID <http://b.id/> = A.BID and B.Name = "Name1"
>>> inner join B where B.ID <http://b.id/> = A.BID and B.Name = "Name2"
>>>
>>> is it possible or do I need to revert to T-SQL queries here?
>>>
>>> --
>>> Patrik Löwendahl
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> 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]<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]<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.

Reply via email to