, DB:
DetachedCriteria subQuery =...//- > , , "SetFirstResult" "SetMaxResults"
DetachedCriteria rootQuery = DetachedCriteria.For();// T -
subQuery.SetProjection( Projections.Distinct( Projections.ProjectionList(). (Projections.Alias (Projections.Property( "ID" ), "ID" )) ) );
//: , "ID"
rootQuery.Add(Subqueries.PropertyIn( "ID", subQuery));
//... rootQuery T, .
, - :)
Roman
Román Lescano