c# nhibernate addorder error
===

I have the following Entity Customer, wich has a Property Contact of type contact.cs, wich has a List of Persons of type Person.cs.

This class Person.cs has a Property Lastname.
 Now I have the following Problem: I need to Order My List of Customers by this Person.Lastname.
My crit is as follows:

    ICriteria crit = CustomerRepository.CreateCriteria();

    crit.SetFirstResult(start);
    crit.SetMaxResults(count);
 
    DetachedCriteria dCrit = DetachedCriteria.For<Customer>();

    dCrit.CreateCriteria("Employee")
        .CreateCriteria("User")
        .Add(Restrictions.Eq("UserName",username));
 
    dCrit.CreateAlias("Contact","con");
    dCrit.CreateAlias("con.Persons","per");
    if(!String.IsNullOrWhiteSpace(search))
    {

        dCrit.Add(Restrictions.InsensitiveLike("per.LastName","%"+search+"%"));

    }
    dCrit.AddOrder(Order.Asc("per.LastName")); 
    dCrit.SetProjection(Projections.Distinct(Projections.Property("Id")));
 
    crit.Add(Subqueries.PropertyIn("Id",dCrit));
    //crit.CreateCriteria("Contact").CreateCriteria("Persons").AddOrder(Order.Asc("LastName"));

And the Problem is, when I run the AddOrder on the dCrit I get the following Error Message from our RoleRepository (which is part of our CustomMembershipProvider), which has nothing to do with the CustomerRepository that creates the Criteria. The Error Message is:
	could not execute query 

Both Repositories use the same session.

If I run the AddOrder on the crit (commented last line) I get duplicate datasets and that is why i need to run the addorder on the dCrit.

Has anybody an idea of how to solve this problem. Thanks a lot in advance ivo