SecondaryTable is an error because in the end I only have one table
I understood … from the father he will look for all the girl classes and request them.
I tried by putting @Polymorphisme (EXPLICIT) on the daughter classes but it still searches for the daughter classes.
It does not matter, for the moment I can leave it like that, it works regardless.
Load to father :
select
objethiber0_.ID as id1_14_0_,
objethiber0_.ACTEURCREATION as acteurcreation2_14_0_,
objethiber0_.ACTEURMODIFICATION as acteurmodification3_14_0_,
objethiber0_.ACTEURSUPPRESSION as acteursuppression4_14_0_,
objethiber0_.DATECREATION as datecreation5_14_0_,
objethiber0_.DATEMODIFICATION as datemodification6_14_0_,
objethiber0_.DATESUPPRESSION as datesuppression7_14_0_,
objethiber0_.ETATOBJET as etatobjet8_14_0_,
objethiber0_.PERE as pere9_14_0_,
objethiber0_.FILS as fils1_8_0_,
objethiber0_.clazz_ as clazz_0_
from
( select
ID,
ACTEURCREATION,
ACTEURMODIFICATION,
ACTEURSUPPRESSION,
DATECREATION,
DATEMODIFICATION,
DATESUPPRESSION,
ETATOBJET,
PERE,
null as FILS,
0 as clazz_
from
TPERE
union
all select
ID,
ACTEURCREATION,
ACTEURMODIFICATION,
ACTEURSUPPRESSION,
DATECREATION,
DATEMODIFICATION,
DATESUPPRESSION,
ETATOBJET,
PERE,
FILS,
1 as clazz_
from
TFILS
) objethiber0_
where
objethiber0_.ID=?
and (
mod(objethiber0_.etatobjet,2)=0
)
and son :
select
objethiber0_.ID as id1_14_0_,
objethiber0_.ACTEURCREATION as acteurcreation2_14_0_,
objethiber0_.ACTEURMODIFICATION as acteurmodification3_14_0_,
objethiber0_.ACTEURSUPPRESSION as acteursuppression4_14_0_,
objethiber0_.DATECREATION as datecreation5_14_0_,
objethiber0_.DATEMODIFICATION as datemodification6_14_0_,
objethiber0_.DATESUPPRESSION as datesuppression7_14_0_,
objethiber0_.ETATOBJET as etatobjet8_14_0_,
objethiber0_.PERE as pere9_14_0_,
objethiber0_.FILS as fils1_8_0_
from
TFILS objethiber0_
where
objethiber0_.ID=?
and (
mod(objethiber0_.etatobjet,2)=0
)