I would like to ask if it's possible to do this using hibernate.
Let say I have already run a HQL and retrieved a collection. Is it possible to further filter it using hibernate?
I tried to use the <filter>
to the header class and add session.enable() before the query, but seems it's not working.
Sample code
Query search = session.getNamedQuery(HQL_SOMEDEFAULTQUERY);
List results = search.list();
//further filtering ...
Stripped down HQL
select h
from flow as f
join f.item as i
join i.header as h
where i.status = :status
and f.staff = :staff
order by i.prId desc
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…