[hibernate-dev] Could be a bug in aliastobean
Horan, Jeff
Jeff_Horan at cable.comcast.com
Fri Feb 16 12:29:33 EST 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20070216/846022e8/attachment.html
More information about the hibernate-dev
mailing list