Code Monkey home page Code Monkey logo

Comments (5)

jbrisbin avatar jbrisbin commented on May 22, 2024

I've fixed the visibility of contentNegotiatingViewResolver() by making all the bean methods public. Sorry for the oversight there. That change will be in the next snapshot.

The results pages do not embed linked entities, they only provide links. This is by design. If there was no corresponding Repository for a linked entity, however, it would render the entity directly into the result document as-is and not as a link.

The data passed to the view is always a Link object, not the entity, so even overriding the view won't get you any closer to rendering entities directly into the result document.

We're always open to discussion, though, so it's not set in stone.

from spring-data-rest.

jbrisbin avatar jbrisbin commented on May 22, 2024

I'm experimenting with a URL parameter that can turn this behaviour on and off. If you include "returnLinks=false" as a parameter, it will send back the entity rather than generating a link for it. Would that suit your use case better?

from spring-data-rest.

gorky078 avatar gorky078 commented on May 22, 2024

Hi,
first of all thanks for the answer: i think this param can be a very useful solution for my issue.

However i experimented another problem when i try to use your tip:

If there was no corresponding Repository for a linked entity, however, it would render the entity directly into the result document as-is and not as a link.

because trying to exclude from my project one repository, the system seem to ignore the FetchType.LAZY directive on entity relationship involing the entity related to that repository.
This is a serious problem, because my application crash down trying to fetch a large set of data.

I'm evaluating the use of spring data rest web exporter in a project including a large set of jpa repository with a lot of relationship, using hibernate.

from spring-data-rest.

jbrisbin avatar jbrisbin commented on May 22, 2024

I'm making some changes right now that will actually render the entity directly into the response by default, so this will be one change that might make your use case easier.

As to the eager loading of dependent entities: I haven't extended the support for paging into child relationships yet. I'm hopeful I can get that addition into the next release (probably an RC2).

from spring-data-rest.

gorky078 avatar gorky078 commented on May 22, 2024

It's ok.
This project seem to be very interesting, but only HATEOAS approach in REST doesn't allow the full use in a standard application context for getting a normal list of entities with attributes.
So we expect for a new release
Tks

from spring-data-rest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.