commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Fitzpatrick <>
Subject [BeanUtils] ResultSetDynaSet Lower-Case Property Names
Date Fri, 29 Nov 2002 03:28:13 GMT
The ResultSetDynaSet returns DynaBeans whose PropertyNames are based on 
the ColumnNames of the ResultSet, but converted to all lower-case 
letters.  In general, I agree with Craig's comment that this creates a 
known result in an environment where ColumnName standards vary between 
DBMSs (  

However, if a target JavaBean class were to be defined 
with PropertyNames that are based on those same ColumnNames, it wouldn't 
seem to be the natural course of action for those PropertyNames to 
consist of all lower-case letters.  The natural thing would seem to be 
for the PropertyNames to have mixed upper- and lower-case letters, as 

If the objective is to have instances of a given JavaBean class returned 
from the SQL operation, the PropertyUtils.copy( destJavaBean, 
resultSetDynaSetDynaBean ) method seems to be the obvious choice. 
 However, since the PropertyNames of the resultSetDynaSetDynaBean 
consist of only lower-case letters, some of those properties won't match 
the mixed-case PropertyNames of the JavaBean, and some of the properties 
won't be copied.

If I am misunderstanding the problem, of if I am creating a problem 
where none really exists, please advise.  Otherwise, I've got some 
classes that I could contribute that would bridge that gap.

Ken Fitzpatrick

View raw message