I need to convert this SQL Query to a Hibernate QL...
I have Problems withe the Keyword "ON"... HQL doesn't take it. Is there a way to work arround the "ON"?
And can I get a Resultlist of the three Entities (Table1 , Table2 and Table3) at once.. Perhaps like an Array Object?
//...
q = em.createQuery("FROM Table1 t, Table2 a, Table3 d JOIN Table2 ON (t.id = a.id) FULL JOIN Table3 ON (t.id = .id) WHERE (ASta BETWEEN ? AND ?) OR (DStd BETWEEN ? AND ?)");
q.setParameter(0, orp.getStartTime());
q.setParameter(1, orp.getEndTime());
q.setParameter(2, orp.getStartTime());
q.setParameter(3, orp.getEndTime());
//...
Thanks very much for your help... I really can't figure it out...
|