Not in clause in Hibernate
How do I achieve something like -->

    Select sm.memCd, sm.entityName from MemberSBandAP sm 
    where sm.memStatus='Active' and  sm.entityType='M'  
    and  sm.memCd not in (select l.userName from Login l) 
    order by sm.entityName DESC, sm.memCd"


basically how do I write a not in clause in hibernate? 

I was referring to [this tutorial section 14.10 Expressions ][1]


  [1]: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html

in there they say that a not in can be directly used in the query string, but the query is not returning any records. Goggled for other examples but most of the places it says that we need to criteria class. Is it really required? Can't we directly write a sub query and use not in? Any help will be greatly appreciated.


Thanks in advance

Sweta
Not in clause in Hibernate
===

How do I achieve something like -->

    Select sm.memCd, sm.entityName from MemberSBandAP sm 
    where sm.memStatus='Active' and  sm.entityType='M'  
    and  sm.memCd not in (select l.userName from Login l) 
    order by sm.entityName DESC, sm.memCd"


basically how do I write a not in clause in hibernate? 

I was referring to [this tutorial section 14.10 Expressions ][1]


  [1]: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html

in there they say that a not in can be directly used in the query string, but the query is not returning any records. Goggled for other examples but most of the places it says that we need to criteria class. Is it really required? Can't we directly write a sub query and use not in? Any help will be greatly appreciated.


Thanks in advance

Sweta