select
machine0_.id as id1_0_,
machine0_.weight as weight2_0_,
machine0_.name as name1_1_,
machine0_.targetName as targetNa1_2_,
machine0_.clazz_ as clazz_
from
( select
id,
weight,
null as name,
null as targetName,
0 as clazz_
from
Machine
union
all select
id,
weight,
name,
targetName,
2 as clazz_
from
T800
union
all select
id,
weight,
name,
null as targetName,
1 as clazz_
from
Robot
) machine0_
where
machine0_.weight>=?