Skip to content

Add infrastructure for generic query augmentation [DATACMNS-293] #766

Open
@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened DATACMNS-293 and commented

When working with repositories there might be use cases that involve the queries to be executed for that repository to contain some kind of global criteria. A good example for such a scenario is ACL based security to domain objects, e.g. with a global criteria causing the repository to only return domain objects created by the current user or only objects the current user is allowed to read.

A related example is working with data that has a soft-delete flag and essentially has to consider objects with that flag set to true non-existant.

Implementing these kinds of scenarios require the queries to the underlying store to be augmented with additional criterias. So we need to come up with some an SPI to prepare the query about to be executed and potentially even alter a delete(…) call into an update (for the soft-delete case).

From a more general point of view we need access to the method the query is executed for and it's associated metadata


Issue Links:

  • SEC-2409 Spring Security / Spring Data Acl Integration
    ("is depended on by")

  • DATAMONGO-1151 Introduce ability to append queries against a particular collection
    ("is depended on by")

  • DATAJPA-307 Add support for soft deletes

  • DATAJPA-1551 Create an API to customize query creation and query processing

116 votes, 92 watchers

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions