spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

Support hint resolving from parameters

Open ivansenic opened this issue 1 year ago • 1 comments

Currently we cannot specify hint both using @Query or @Hint annotation that could be resolving the value from parameters. For example, The following should work:

@Query(
        value = "{ something: ?0}",
        hint = "?1"
)
@Hint
Flux<Somthing> findSomething(String something, String hint);

This is working for @Query.value, but as well for @Query.collation (see docs) and not for the hint.

ivansenic avatar Aug 07 '24 13:08 ivansenic

Thanks for your request. Care to provide a bit more details for us, why and how you're using different hints? Exposing hints to the caller side this leaks MongoDB details to places that we actually do not want to deal with database-(implementation)specific values.

mp911de avatar Aug 12 '24 08:08 mp911de