select
account0_.id as id1_0_0_,
account0_.balance as balance2_0_0_,
account0_.interestRate as interestRate3_0_0_,
account0_.owner as owner4_0_0_,
account0_1_.creditLimit as creditLimit1_1_0_,
account0_2_.overdraftFee as overdraftFee1_2_0_,
account0_3_.type as type1_3_0_,
case
when account0_1_.id is not null then 1
when account0_2_.id is not null then 2
when account0_3_.id is not null then 3
when account0_.id is not null then 0
end as clazz_0_
from
Account account0_
left outer join
CreditAccount account0_1_
on account0_.id=account0_1_.id
left outer join
DebitAccount account0_2_
on account0_.id=account0_2_.id
left outer join
SpecialAccount account0_3_
on account0_.id=account0_3_.id
where
account0_.id in (
?,?,?
)