I have a simple object hierarchy, and I want to query each of the objects using list(). The problem is that because of polymorphism, Task.list() returns both instances of type Task and ComplexTask.
class Task {
}
class ComplexTask extends Task {
}
I realize I can solve my problem by having a common abstract superclass, or filter results based on returned type, but was wondering if there is a way to use dynamic finders and get back superclass instances only.