Skip to content

Support Function context aware Repositories operating on a local, filtered data set [DATAGEODE-257] #306

Open
@spring-projects-issues

Description

@spring-projects-issues

John Blum opened DATAGEODE-257 and commented

It would be ideal if a Function bound, Spring Data Repository took context into consideration when performing Repository data access operations.

For instance, if an application-defined Repository is injected into and used in an Apache Geode Function (perhaps a Function annotated with @GemfireFunction in SDG's Function Annotation support), and if the associated Region of the Repository matches when the Function is "executed" on a Region (with @OnRegion), then the Repository would operate on the "local" (possibly, "filtered") data set provided by the FunctionContext.

One such test example exists here along with it's Function definition and Function execution.

However, there are many things that need to be considered carefully as not to adversely affect any existing functionality or behavior. Using Repositories in Functions is quite common in practice. The following list, though not exhaustive, needs to be taken in consideration:

  1. Repositories with an @Region annotation on the Repository itself, or indirectly on the associated application domain object does not match the RegionFunctionContext of the Region targeted Function execution.

  2. Functions executed via @OnMember(s) or @OnServer{s) should be excluded.

  3. Repositories defining raw OQL using the @Query annotation need to be handled appropriately.

  4. Repositories with "custom" implemented methods also need to be handled properly.

  5. ???


Reference URL: https://jira.spring.io/browse/SGF-451

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