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
remove is not supported for LazyList? #906
Comments
I need to update all records in an entity based on new information. The purpose I use LazyList and do the get and remove is to avoid loading my entire query. Now remove doesn't work, how can I avoid loading the entire entity? |
Entities can be removed using their Edit: ok, maybe I misunderstood. Some other options:
Note: Please ask usage questions on Stack Overflow. |
Thank you for responding. The main point I want to understand is how to work with items one by one on the lazylist without having to load all the list items into memory at the same time. I was hoping to load one by get(0), work with it, then unload it with remove(0), then load in the next one. Now I understand that LazyList is unmodifiable, so I can't remove(0), is there a way to unload the record I loaded before loading in the next record? |
No need to unload; findLazy() - unlike findLazyCached() - should not hold on to previously fetched objects.
|
When I do myLazyList.get(0), don't I get the record loaded? |
You do. And LazyList does not keep a reference. |
Updated JavaDoc in Query and LazyList will be available with the next update. |
Basic info (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Got an exception.
Had a peek in LazyList.java:
The text was updated successfully, but these errors were encountered: