-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate all references to the same resource #23
Comments
Hi @ahatius, can you please provide me an example of what you are doing with the filter and without the filter it works properly right? You can also use the caching of the Thanks and regards, Guy |
Hi Guy Thanks for the fast reply :) Actually my wording was not quite correct when I said filter. I'm not using an angular filter, I was actually referencing the comment on line 261 in angular-spring-data-rest-provider.js. According to that every resource will be fetched only once. However, I tried to copy my JSON responses and noticed that they are way too big to copy in here, so I created a small, simple project which provides an example of my problem. Maybe I'm doing something wrong and that's the reason for my issue. You can find the example project here. The project just needs to be checked out and started, everything else should be automatically initialized so you just need to navigate to I'd be really glad if you could have a look at it if you have a moment. |
Hi @ahatius, sorry for my late reply but I hadn't the time to look into it. This nice little project runs and I analyzed your domain model and one issue is that you have cyclic dependencies as shown in this diagram: Therefore the problem is that you call the I will check to add a flag to disable this check that the link was already fetched as this is an issue but then you must not have cyclic dependencies. I would propose that you remove these dependencies and then update the project and I can check again for the flag such that you get the proper responses. Would that be ok for you? Thanks and regards, Guy |
Hi Guy Thank you very much for that analysis. I think that should be feasible. I have removed the circular dependencies for the Product, ProductRate and ProductCategory entities in the test project. I have also removed them for the Job and JobDetail entities, although those didn't seem to be problematic. Cheers, |
Hey Ahatius, nice I am glad to hear that. I will try to integrate the new flag as soon as I have more time and then I will do a new release. Thanks and regards, Guy |
I have the same problem here. I have a directive which loads a tree recursivly from my server (using the I can see that the request for the "root nodes" is made twice, but the following requests which dive deeper are done only once and the resolved response is in one case only filled with the root nodes, the other one has all childs that were fetched. It is very complicated to build up a standalone testcase, but maybe you can have a look at the screenshot. It is a Hope that helps to explain the problem and make further investigation possible |
Hi the flag I will now release Regards, Guy |
Thank you very much, will try it out ;) |
I've got a call that will return multiple entities. I've configured the SpringDataRestAdapter to recursively resolve multiple links.
This actually works fine, but my problem is the filter that ensures that each URL is called only once which leads to unpopulated fields if one of the entities has a link to an resource that was already fetched for another entity. This leaves all references after the first one empty.
While I do appreciate that each URL is only called once (I've already got 29 requests with only one call of SpringDataRestAdapter), it would be extremely useful if other entities that reference the same links would get populated aswell.
The text was updated successfully, but these errors were encountered: