Hello
I'm using a query to return certain fields from a select and I want the returned objects to be instances of "Tuplet1" class.
I get this exception: "
class not found: Tuplet1" on query.List().
Here is the query:
Code:
SELECT new Tuplet1(P.Id, P.ProductName, P.UnitPrice, P.Category.CategoryName, P.Supplier.CompanyName)
FROM Product as P
WHERE P.Supplier.ContactTitle LIKE 'Sales%'
ORDER BY P.Category.Id
The class Tuplet1 has the required constructor.
It is defined in the assembly where the query is created. I also tried defining this class in the assembly containing the domain model (the one with persisten classes and mapping files) that I used in Configuration - same error.
As a note, the query works fine if I don't use the "new" syntax.
How can I tell NHibernate where to find this Tuplet1 class?
Thanks in advance!