Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-289

JDBCDynaClass "lowerCase" option causes problems in RowSetDynaClass

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.8.0
    • DynaBean
    • None

    Description

      JDBCDynaClass / RowSetDynaClass has an option to convert the column names to lower case when creating the associated DynaProperty - this causea a problem in RowSetDynaClass's rows() method which uses the DynaProperty name to access the column value in the ResultSet. I can only think no-one is really using this since its been this way since created (over 4 years ago) - otherwise everyone is using lower case column names in the database anyway!

      The proxy TestResultSet and TestResultSetMetaData implementations used by DynaRowSetTestCase are hacked by using normal case in the meta data - but lower case in the result set.

      Since the DynaProperties are created in column index order - I suggest changing rows() to use the column index, rather than DynaProperty name.

      Attachments

        1. beanutils-289-revision1.patch
          5 kB
          Niall Pemberton

        Activity

          People

            niallp Niall Pemberton
            niallp Niall Pemberton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: