How can I convert that QueryOver<> code to use Query<> with NHibernate 3.3 -


i have class have class b list ... so, queryover have :

classb lb = null;   var result = session.queryover<classa>         .joinalias(x => x.listb, () => lb, jointype.leftouterjoin)         .where(() => lb.property == 1)         .list<classa>(); 

how can using nhibernate query<> ?

thanks

paul

assuming want list of classa having @ least 1 classb property == 1:

var result = session.query<classa>()                     .where(a => a.listb.any(b => b.property == 1))                     .tolist(); 

this wouldn't outer join, though. might emulate adding || !a.listb.any().


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -