//maindocid
var query = QueryOver.Of<Maindoc>().Where(p => p.DocType == (int)doctype).JoinQueryOver<Users>((doc) => doc.Creator).Where(p => p.Id == curLoginUserID).Select(p => p.Id);
return this.GetList<Maindoc>(args, Subqueries.WhereProperty<Maindoc>(p => p.Id).In(query), true);
table
public partial class Maindoc
{
public virtual int Id { get; set; }
public virtual int DocType { get; set; }
public virtual Users Creator { get; set; }
}