i read the corresponding chapter in the manual but i am not sure what is the best way to do the following:
Company is an abstract type. Concrete subtypes are bank and corporate group. Bank has a bool-attribute branch. I want to query all corporate groups and all banks which are no branches.
My first approach would:
from CompanyHPB as comp, BankHPB as bank
where bank.branch = true
But aren't here objects getting retrieved multiple?
What does "from CompanyHPB as comp, BankHPB as bank" exactly mean? Using such a statement in SQL, records would be retrieved twice, wouldn't they?
I just want to apply a criteria only if the object is of a certain subtype (bank).
|