Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-4559

JDBC OG shouldn't return list.get(0) if maxRows > 1 but only 1 row returned

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Complete
    • 5.1 GA
    • 5.2 M1
    • None

    Description

      Object payload = list;
      if (list.isEmpty()) {
      	return null;
      }
      if (list.size() == 1) {
      	payload = list.get(0);
      }
      return payload;
      

      If a select query is performed and maxRows>1 we should always return a List or null rather than getting the first element.

      maxRows>1 implies the application is expecting a List and shouldn't have to check the payload type.

      Attachments

        Activity

          People

            abilan Artem Bilan
            grussell Gary Russell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: