spring-projects / spring-projects/spring-data-rest

Allow the Definition of Projections as Mongo Aggregations or SQLViews [DATAREST-1122]

Open
#1,483 0 comments 1 reaction 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 31, 2020.

type: enhancement
Dominant language
Java
Stars
958
Forks
568
PR merge metrics
No merged PRs in 30d

Description

Gregor Frey opened DATAREST-1122 and commented

I would like to have the possibilities to define Spring Data Rest projections by Mongo Aggregations, and this same feature could probably also be extended to SQLViews. The goal is to do filtering, joining, projecting data in the database to reduce the roundtrips to the DB and also reduce the amount of data transferred. Also I'd like to get it integrated with the Spring Data Rest Hateoas restification, as any other projection.
The Spring Data Mongo module provides also a concept of projections (which is, as far as I can see, unrelated to the Spring Data Rest concept), but it cannot be used with mongo aggregations, because they can not be defined as repository finders, and they are not integrated with the repository restification of Spring Data Rest.
I think this would be a cool feature that improves the performance and also reduces the momory consumption of a mongo app a lot.


Affects: 3.0 RC2 (Kay)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.