Code:
class Shop {
Integer id;
Set<RelContact> relContacts; //getter and setter omitted
}
class RelContact {
Contact contact;
RelationType relationType;
}
class Contact {
Integer id;
String firstname;
String lastname;
}
here is the HQL
" from Shop s where s.relContacts.contact.firstname like'xxx' ".
any wrong with the hql above?
it can work under hibernate 3.0, but when with 3.1.3 it throws following exception.
org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: firstname of: component[contact,relationType]
[from Shop s where s.relContacts.contact.firstname='xxx' ];
any advice will be appreciated!
Code:
Code: