Q:

Compare items in an existing list based on property in HQL

Let say I have two class:

public class A{
 public virtual int Id;
 ...
 ...

}
public class B{
   public virtual int Id;

   public virtual A a;
 ...

}

I have a list of A. List existingObjectAList;
and also I want to search object B's which contains existingObjectAList.
How can I do this In C# with HQL.

A:

var bs = session.CreateQuery("from B where A in (:list)"
                .SetParameterList("list", existingObjectAList)
                .List<B>();

