You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't mentioned explicitly in documentation anywhere that I found. In RepositoryRestResource::excerptProjection related resources are mentioned, but it isn't clear under what conditions related resources are inlined or where they will be inlined.
Expected behavior:
Creating a excerpt projection for a RestRepository for Entity A alters the response to that repository endpoint, but not responses from the repository for Entity B, where B contains links to A.
Actual behavior:
All references to Entity A inside Entity B are embedded, regardless if they embedded before creating an excerpt for A. This can cause an N^2 size explosion if there are many of Entity B that have many of Entity A related to them.
Thoughts:
It seems like there should be finer-grained control over what gets embedded and what gets linked. Perhaps an annotation for specifying what fields/collections are embedded or not instead of the logic inside EmbeddedResourcesAssembler?
Affects: 3.1.5 (Lovelace SR5)
The text was updated successfully, but these errors were encountered:
magneticflux- opened DATAREST-1350 and commented
This isn't mentioned explicitly in documentation anywhere that I found. In
RepositoryRestResource::excerptProjection
related resources are mentioned, but it isn't clear under what conditions related resources are inlined or where they will be inlined.Expected behavior:
Creating a excerpt projection for a
RestRepository
for Entity A alters the response to that repository endpoint, but not responses from the repository for Entity B, where B contains links to A.Actual behavior:
All references to Entity A inside Entity B are embedded, regardless if they embedded before creating an excerpt for A. This can cause an N^2 size explosion if there are many of Entity B that have many of Entity A related to them.
Thoughts:
It seems like there should be finer-grained control over what gets embedded and what gets linked. Perhaps an annotation for specifying what fields/collections are embedded or not instead of the logic inside
EmbeddedResourcesAssembler
?Affects: 3.1.5 (Lovelace SR5)
The text was updated successfully, but these errors were encountered: