-
Notifications
You must be signed in to change notification settings - Fork 701
Description
Gerrit Meier opened DATACMNS-1258 and commented
To provide SpEL support to the users most of the Spring Data projects use their own logic to parse the given query, interpret SpEL expression, replace SpEL expressions with repository specific placeholders and create parameter mapping for them with the evaluated values.
At least the providing of common SpEL expressions (like :#{#...}, ?:#{[...}}, etc.) and evaluating them to a parameter map could be done by a functionality based in Spring Data Commons.
Besides the easier maintenance of parsing and evaluating it would define the "right" placeholders that are to be used in @Query values.
To generate the repository specific placeholders a supplier function or something similar would be required to enable the replacement mechanism to generate a valid query with placeholder
Issue Links:
- DATACMNS-1260 Extract EvaluationContextProvider and SPIs into dedicated package
("depends on") - DATAGRAPH-839
@Queryannotation should support SpEL
("is depended on by") - DATAJPA-1267 Integrate newly created API to detect SpEL expressions in repository queries
("is depended on by")
Referenced from: pull request #275