You have to import any non-persistent types that you want to create using SELECT NEW (and also any enumerations that you want to us in your HQL, but that's another matter).
You can add imports in the config file (not sure how though) or programatically in your Configuration object before you create your SessionFactory.
(treat as pseudo-code)
Code:
//Create the Configuration object and add the persistent classes
Configuration cfg = new Configuration();
cfg.AddAssembly("DomainAssembly");
//This is how you import a class
System.Type typeToImport = typeof(Domain.EmployeeListItem);
cfg.CreateMappings().AddImport(typeToImport.AssemblyQualifiedName, typeToImport.FullName);
Often, I import a batch of classes in an assembly (Data Transfer Objects, for example) so I can use them in HQL.
Code:
System.Type[] typesToImport = Assembly.GetExecutingAssembly().GetTypes();
foreach(System.Type typeToImport in typesToImport)
{
if(typeToImport.Namespace == "Framework.DTO")
cfg.CreateMappings().AddImport(typeToImport.AssemblyQualifiedName, typeToImport.FullName);
}
Hope that helps.
Symon.