Closed as not planned
Closed as not planned
Description
Mark Pollack opened DATAMONGO-103 and commented
Instead of
public interface PersonRepository extends MongoRepository<Person, String>
@Query(value="{ 'firstname' : ?0 }", fields="{'firstname' : 1, 'lastname' : 1")
List<Person> findByThePersonsFirstname(String firstname);
}
if we had
public interface PersonRepository extends MongoRepository<Person, String>
@Query(value="{ 'firstname' : ?0 }",
List<Person> findByThePersonsFirstname(String firstname, Path<Person>... paths);
}
or more generally
public interface PersonRepository extends MongoRepository<Person, String>
List<Person> findByFirstname(String firstname, Path<Person>... paths);
}
would like to invoke like this
List<Person> folks = repo.findByFirstname(String firstname, QPerson.firstName, QPerson.lastName);
Affects: 1.0 M2
1 votes, 1 watchers