spring-projects / spring-projects/spring-hateoas

How to extend the EntityModel now that all constructors are deprecated?

Open
#1,297 7 comments 1 reaction 1 assignee View on GitHub

@odrotbohm is already working on this.

Since May 26, 2020.

in: core in: mediatypes process: waiting for feedback question
Dominant language
Java
Stars
1.1k
Forks
476
PR merge metrics
No merged PRs in 30d

Description

Hi,

I moved to Spring HATEOAS 1.1.0.
I want to inherit from EntityModel but all constructors are deprecated.

Are they expect to become private? If not, what is their future? I suppose they will become protected.

We use Sonar to forbid new usage of deprecated elements. This is problematic for us.

As an alternative, I wanted to extend RepresentationModel instead but my model is very similar to EntityModel and does not behave like it. I guess it has something to do with EntityModel registered mixins. I'd like to avoid registering all mixins myself.

Could all accesses to content (in EntityModel) be done through getContent or a new protected method?

Contributor guide

No contributing guide indexed for this repository

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.