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

Repository metadata obtains an incorrect return type of repository methods returning Iterables

    Details

    • Sprint:
      Lovelace M2 / M3

      Description

      I have a CRUD repository on a type which is Iterable. The repository has a named query method we are executing. On execution, a ResultProcessor is invoked, which contains a returned type member. The member is calculated via AbstractRepositoryMetadata.unwrapWrapperTypes(). Since the query method returns an Iterable, that method correctly unpacks the TypeInformation on the first iteration to obtain the return type of the query method. However, it schedules another call, this time on the domain type itself, which, as stated above, is Iterable.

      This confuses the result processor since it now thinks it has to perform a conversion from the elements of the query's result set to the domain class' Iterable elements.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olivergierke Oliver Gierke
                Reporter:
                attadanta Kiril Tonev
                Last updater:
                Mark Paluch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: