//maindocid
var query = QueryOver.Of().Where(p => p.DocType == (int)doctype).JoinQueryOver((doc) => doc.Creator).Where(p => p.Id == curLoginUserID).Select(p => p.Id);
return this.GetList(args, Subqueries.WhereProperty(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; }
}