| Hi guys,From the documentation I can see that implicit polymorphism,  in my case, will not generate SQL UNIONs when performing polymorphic queries. but is there any way of looping through the concrete classes and union the results manually?
 
 My scenario:
 
 Im using a "Table per concrete class" approach, and I don't  hold
 instances of the superclass
 
 Abstract class CoreItem (no mapping file needed)
 Concrete class ResearchItem inheriting from CoreItem with mapping file including all core item properties
 Concrete class TestItem inheriting from CoreItem with mapping file including all core item properties
 
 When I query the CoreItem like below I can see 2 queries run correctly
 from sqlprofiler, but only the second is returned...
 
 ICriteria crit = session.CreateCriteria(typeof(CoreItem));
 ..some expressions...
 crit.List<CoreItem>();
 
 
 Unfortunately I need to have the inheritance this way because the 2 concrete items actually live in separate assemblies, meaning the abstract class doesn't have any knowledge of them (so cant do a subclass mapping - as far as im aware...)
 
 so to reiterate, is there anyway built in way loop through the mapped concrete classes (as the the project where the query is being executed only knows about the CoreItem ) to either query them separately or union the results manually?
 
 Cheers guys,
 kmoo01
 
 
 |