What happens if you just use "useUnit" in your Expression?
Matt
On Feb 5, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote:
I have appfuse:gen generated class with boolean property
..
private boolean useUnit;
...
and generated setter/getter are:
public boolean isUseUnit() {
return this.useUnit;
}
public void setUseUnit(boolean useUnit) {
this.useUnit = useUnit;
}
in hibernate dao getAll method, i put some criteria
Session session = getSessionFactory().getCurrentSession();
Criteria crit = session.createCriteria(this.persistentClass);
crit.add(Expression.eq("isUseUnit", new Boolean("true")));
objects = crit.list();
but crit.list() throws exception 'could not resolve property
isUseUnit ..'
It tooks several days to figure out what wrong with my code until I
changed
getter name to getUseUnit().
If I want to keep "isUseUnit" getter name, how to avoid above
exception ?
many thanks,
--
Ernas M. Jamil
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]