Spring Data MongoDB
  1. Spring Data MongoDB
  2. DATAMONGO-291

Path expressions in repository methods should honour mapping metadata

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 M4
    • Fix Version/s: 1.0 M5
    • Component/s: Mapping, Repository
    • Labels:
      None

      Description

      Given the following domain class

      class User {
      
        @Field("foo")
        private String firstname;
      }
      

      and a repository interface

      interface UserRepository extends Repository<User, Long> {
      
        List<User> findByFirstname(String firstname);
      }

      a query {{

      {'firstname' : ?1}

      }} is created which is of course wrong as the property is mapped to the field foo. The MongoQueryCreator does not seem to be aware of the mapping information.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Oliver Gierke
              Reporter:
              Oliver Gierke
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.5d
                0.5d