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

@Meta does not support property resolution

Open gbaso opened this issue 1 year ago • 1 comments

The annotation org.springframework.data.mongodb.repository.Meta is used, among other things, to define a max execution time for the query:

interface MyRepository extends MongoRepository<MyDocument, String> {

  @Meta(maxExecutionTimeMs = 10)
  Page<MyDocument> findBySomeProperty(String someProperty);

}

However there is currently no attribute that supports spring placeholders and SpEL expressions. As such the execution time limit is not configurable for spring repositories and one must manually write the query with MongoTemplate if configurability is required.

gbaso avatar Oct 11 '24 09:10 gbaso

Related:

  • #4318
  • #4667

mp911de avatar Oct 14 '24 09:10 mp911de