Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-917

Query methods returning Maps shouldn't return null if no result is present

    XMLWordPrintable

    Details

    • Sprint:
      Kay M1

      Description

      It's possible to return a Map<Key, Value> inside a custom repository using @Query. The problem is that for no results the Map is null instead of empty. In my interpretation if the underlying ResultList is empty then the map is of course null, but could be initiated to empty. Also Optional<Map<Key, Value>> throws an IllegalStateException.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              daniphp@gmail.com Daniel Dacar
              Last updater:
              Oliver Drotbohm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: