gavin wrote:
Its not possible in Hibernate 2.1. It is possible in 3.0. See my recent blog entry.
and:
public abstract class Documento{
...
}
public class Proposicao extends Documento{
...
}
public class Veto extends Proposicao{
Proposicao proposicaoPai;
}
I am trying to make one automatic relationship (Proposicao and Veto).
The error message is when i try this:
Code:
public List getListOrderTipo() throws HibernateException {
Session session = sessionFactory.openSession();
List list =
session.find(
"select obj from Proposicao obj order by obj.tipoProposicao");
session.flush();
session.close();
return list;
}
The error:
Code:
net.sf.hibernate.QueryException: could not resolve property: tipoProposicao of: sl.model.Veto [select obj from sl.model.Veto obj order by obj.tipoProposicao]
(my english is bad.. :))