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

Add a findByIdOrNull(…) Kotlin extension to CrudRepository

    Details

      Description

      In Kotlin, it is idiomatic to deal with return value that could have or not a result with nullable types since they are natively supported by the language. This commit add a findByIdOrNull variant to CrudRepository#findById that returns T? instead of Optional<T>.

        Attachments

          Activity

            People

            • Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              sdeleuze Sébastien Deleuze
              Last updater:
              Christoph Strobl
            • Votes:
              15 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: