Uploaded image for project: 'Spring Data MongoDB'
  1. Spring Data MongoDB
  2. DATAMONGO-1911

String-query accepting UUID renders to $uuid

    XMLWordPrintable

    Details

      Description

      String-based queries via @Query(…) render a predicate prefixed with $uuid that can't be executed anymore.

      public interface CredentialsRepository extends MongoRepository<Credentials, Long> {
          @Query("{ 'userId' : ?0}")
          Credentials retrieveWithUserId(UUID userId);
      }
      

      renders a query:

      {userId: {$uuid : …} }
      

      instead of

      {userId: … }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              mp911de Mark Paluch
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: