spring-projects / spring-projects/spring-data-mongodb

@Meta does not support property resolution

Open
#4,808 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

has: breaking-change status: pending-design-work status: waiting-for-triage theme: MongoDB 5.0
Dominant language
Java
Stars
1.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the org.springframework.data.mongodb.repository.Meta annotation and trace how its maxExecutionTimeMs value reaches repository queries; compare this with the MongoTemplate path mentioned in the issue. Done means repository metadata can resolve Spring placeholders and SpEL expressions for the execution-time limit, with behavior verified by appropriate repository tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.