Hibernate version: 3
Name and version of the database you are using: hsqldb 1.8.0.1
I'm using hibernate through spring, and I have a many-to-one mapping between two objects. So there's
KpiSummary which has:
Code:
<many-to-one name="category" column="kpi_category_id" not-null="true" lazy="false/>
Category has:
Code:
<property name="description" column="description" type="string" not-null="true"/>
What I want to be able to do is select KpiSummary instances for a particular category description (or serial at a push). Like this:
Code:
return this.getHibernateTemplate().find("from KpiSummary where category.description = ?", new Object[]{pCategoryName});
but this fails with an org.hibernate.QueryException: could not resolve property: description of: com.company.kpi.dom.KpiSummary.
Can someone point me towards some documentation on how to do this please, I haven't managed to find any.
Thanks,
Tim.