There is a property you can set on the configuration
http://forum.hibernate.org/viewtopic.php?p=2376058
http://forum.hibernate.org/viewtopic.php?p=2376058
This property only works when you are using hql.
I am not sure about mappings but I know if you annotate the properties and not the getters or setters it will access the property directly skipping the getters or setters, which would allow you to do something like this.
public boolean isTest(){
if(this.test==1)
return true;
else
return false;
}
public void isTest(boolean test){
if(test)
this.test=1;
else
this.test=0;
}
There are other ways also, which I can remember but maybe someone else can give their input.