Could be a bug in aliastobean
by Horan, Jeff
I'm using oracle 9i and H3 and when I send a select statement and return
an object using a transform like:
SQLQuery q = ses.createSQLQuery( select lata from
call_record where npa=:npa and nxx=:nxx );
q.setParameter( "npa", "800" );
q.setParameter( "nxx", "555" );
q.setResultTransformer( Transformers.aliasToBean(
LataResult.class ) );
List fromList = q.list();
it fails with:
org.hibernate.PropertyNotFoundException: Could not find setter for LATA
on class com.LataResult
However, when I change:
private Long lata;
To:
private Long LATA;
along with getters and setters to:
public Long getLATA() {
return LATA;
}
public void setLATA( Long lata ) {
LATA = lata;
}
Then it works. So it is not following Java accessor standards of mixed
case method names.
Jeff
18 years