Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-1579

Support multiple out parameters with nullable output data ad hoc stored procedure

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2 RC1 (Moore)
    • Fix Version/s: 2.2 RC2 (Moore)
    • Component/s: Core
    • Labels:
      None

      Description

      While calling the procedure, the API org.springframework.data.jpa.repository.query#extractOutputValue(StoredProcedureQuery storedProcedureQuery) is unable to render a value, in case the stored procedure doesnt set any value to the output variable. In such case a null pointer exceptions occurs.

      Root Cause:

      JAVAs Collectors.toMap(...) API doesn't allow null, as a value in the Map. In this case however null value is set, in case the output variable is null.

       

      Proposed Solution:

      Returning a Map<String, Optional<Object>> instead of just Map<String, Object> in case there are more than one output variable.

        Attachments

          Activity

            People

            Assignee:
            schauder Jens Schauder
            Reporter:
            Vincent013 Jyotirmoy Singha
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: