I believe that I'm giving enough to answer the question, but if not, I'll bring in my real example with mapping files and code.
Let's say I have the following classes:
Code:
class Bat {
Collection fooBars;
}
abstract class FooBar {
String fooBarID;
}
class Foo extends FooBar {}
class Bar extends Bar{}
Foo and Bar are mapped as joined subclasses of FooBar.
The fooBars collection in Bat contains a number of objects, some Foo objects and some Bar objects.
What kind of HQL magic would I invoke to get all the elements of the fooBars collection that are instances of Foo?