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

Provide a way to expose all ids [DATAREST-234]

Open
#617 2 comments 0 reactions 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

Petar Tahchiev opened DATAREST-234 and commented

Hello,

in my application I have about 60 entity models defined. I want SDR to return the ids for all of them. I found the exposeIdsFor method on RepositoryRestConfiguration so I can use it like this:

config.exposeIdsFor(CategoryModel.class, ProductModel.class);

but it's really clumsy to list all the 60 entities there. I also tried to specify the superclass for all the entities, but it still didn't work. I must manually list them one by one.
My suggestion is to add a method (like "exposeIdsForAll(true)") that will allow to expose ids for all entities


Affects: 2.0 M1 (Codd)

2 votes, 5 watchers

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.