With Hibernate 3.0, I have a simple relationship, even more simplified:
Code:
public class Absence
{
public String name;
public Set absenceDetails;
...
}
public class AbsenceDetail
{
public String status;
}
I need to select all Absences, where the name = x and it has to have a AbsenceDetail.status of y.
I have been trying:
Code:
from Absence absence where
:status = all elements(a.absenceDetails.status) and
absence.name= :name
However, I get the error:
Quote:
Root Cause :net.sf.hibernate.QueryException: expecting 'elements' or 'indices' after: name [from Absence absence where
:status = all elements(a.absenceDetails.status) and
absence.name= :name]
Can anyone help?
Regards,
Peter