Polishing.
Reformat code. Make getAnnotatedHint non-nullable. See #3230 Original pull request: #4339
This commit is contained in:
@@ -306,14 +306,15 @@ The `@Hint` annotation allows to override MongoDB's default index selection and
|
||||
====
|
||||
[source,java]
|
||||
----
|
||||
@Hint("lastname-idx") <1>
|
||||
@Hint("lastname-idx") <1>
|
||||
List<Person> findByLastname(String lastname);
|
||||
|
||||
@Query(value = "{ 'firstname' : ?0 }", hint="firstname-idx") <2>
|
||||
@Query(value = "{ 'firstname' : ?0 }", hint = "firstname-idx") <2>
|
||||
List<Person> findByFirstname(String firstname);
|
||||
----
|
||||
|
||||
<1> Use the index with name `lastname-idx`.
|
||||
<2> The `@Query` annotation defines the `hint` alias which is equivalent to explicitly adding the `@Hint` annotation.
|
||||
<2> The `@Query` annotation defines the `hint` alias which is equivalent to adding the `@Hint` annotation.
|
||||
====
|
||||
|
||||
[[mongodb.repositories.queries.update]]
|
||||
|
||||
Reference in New Issue
Block a user