Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2812

ColumnQuery mapper function is not applied in ResultBatchIterator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2
    • 4.2.1, 5.0-M1
    • Core Library
    • None

    Description

      query.batchIterator() call always returns Object[] disregarding mapper set for the ColumnQuery causing ClassCastException

      Query example:

      void select() {
        // actual type of the iterator will be Object[] instead of DTO
        ResultBatchIterator<DTO> it = ObjectSelect.columnQuery(Entity.class, Entity.ATTRIBUTE1, Entity.ATTRIBUTE2)
           .map(this::toDto)
           .batchIterator(context, 100);
      }
      
      DTO toDto(Object[] data) {
        // ...
      }
      

      Attachments

        Issue Links

          Activity

            People

              ntimofeev Nikita Timofeev
              ntimofeev Nikita Timofeev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: