I have tree of classes:
classA {
classB b;
classC c;
.....
}
I have HQL query like this:
SELECT a.field1, b.field2, c.field3, c.field4
FROM a LEFT OUTER JOIN b ON a.id = b.fk
LEFT OUTER JOIN c ON b.id = c.fk
This query returns List<Object[]>
.
Is it possible to cast the returned data to the following class:
classD {
Type1 fiedl1;
Type2 field2;
Type3 field3;
}
So can casting be made by Hibernate or I need manually do all casting?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…