NHibernate version:1.2.1.4000
I am trying to query my data base to get an enumerator on all the objects in it. I am simply passing a query in the form of:
Code:
IQuery query = session.CreateQuery("from System.Object");
This query returns an empty enumerator when I call
Code:
query.Enumerable();
(I am not showing all the code)
However if I specifically write the type of the objects I want to take (I have one object type in my data base
Code:
IQuery query = session.CreateQuery("from TestAssembly.Person");
query.Enumerable() - now returns an enumerator containing the objects from the data base. In my scenario I do not know the objects type in advance.
I want the query to return an enumerator that enumerates on all the objects.
Am I supposed to enable something in the config or the mapping of person so it will support inheritance in queries?
Thanks
Eitan