Skip to content

@Meta does not support property resolution #4808

Open
@gbaso

Description

@gbaso

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions