I am new to Nhibernate with C#.
Here is my SQL query:
select * from advis_productattributes where ID in
(select attributeid from advis_productattributes_products where productid=1);
I know about simple select query in HQL:
string hql = @"select p from ProductAttributes_Products p.ProductId :id";
var query = new SimpleQuery<ProductAttributes_Products>(hql);
query.SetParameter("id", ProductId);
return query.Execute();
I have searched on net but remained failure. How do I write HQL with a subquery?
Here is design of classes.
