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 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14796).
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
appropriate.
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.
Thanks!
Ken Fitzpatrick
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: [BeanUtils] ResultSetDynaSet Lower-Case Property N... Ken Fitzpatrick
- Re: [BeanUtils] ResultSetDynaSet Lower-Case Prope... Craig R. McClanahan
