Skip to content

DATAMONGO-990 - Add support for SpEL expressions in @Query. #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

thomasdarimont
Copy link

Ported and adapted support for SpEL expressions @query annotations from Spring Data JPA. StringBasedMongoQuery can now evaluate SpEL fragments in queries with the help of the given EvaluationContextProvider. Introduced EvaluationContextProvider to AbstractMongoQuery. Exposed access to actual parameter values in MongoParameterAccessor.

Thomas Darimont and others added 2 commits March 30, 2015 15:54
Ported and adapted support for SpEL expressions @query annotations from Spring Data JPA. StringBasedMongoQuery can now evaluate SpEL fragments in queries with the help of the given EvaluationContextProvider. Introduced EvaluationContextProvider to AbstractMongoQuery. Exposed access to actual parameter values in MongoParameterAccessor.

Original pull request: #285.
*/
public class MongoRepositoryFactory extends RepositoryFactorySupport {

private static final SpelExpressionParser EXPRESSION_PARSER = new SpelExpressionParser();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move this SpelExpressionParser to RepositoryFactorySupport - this could then be shared between multiple store modules.

thomasdarimont pushed a commit that referenced this pull request Jun 1, 2015
Ported and adapted support for SpEL expressions @query annotations from Spring Data JPA. StringBasedMongoQuery can now evaluate SpEL fragments in queries with the help of the given EvaluationContextProvider. Introduced EvaluationContextProvider to AbstractMongoQuery. Exposed access to actual parameter values in MongoParameterAccessor.

Original pull request: #285.
odrotbohm added a commit that referenced this pull request Jun 1, 2015
Removed EvaluationExpressionContext from all AbstractMongoQuery implementations that don't actually need it and from AbstractMongoQuery itself, too. Cleaned up test cases after that.

Moved SpEL related tests into AbstractPersonRepositoryIntegrationTests to make sure they're executed for all sub-types. JavaDoc and assertion polishes.

Original pull request: #285.
@odrotbohm odrotbohm closed this Jun 1, 2015
@odrotbohm odrotbohm deleted the issue/DATAMONGO-990 branch June 1, 2015 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants