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
I'm getting very inconsistent and buggy behavior when calling Collections.sort() and Collections.reverse() on the LazyLists returned by query.getResultList(). Basically, the lists are sometimes properly sorted and reversed and sometimes they are half sorted, not sorted in the right order, etc.
I couldn't narrow down the issue precisely but I assume it happens if the LazyList isn't fully populated. Couple questions:
Is there anyway to force the lazylist to be populated, or disable lazy loading altogether?
Is there any precautions I need to take for these lazy list to behave as normal lists?
Thanks!
The text was updated successfully, but these errors were encountered:
That's what I ended up doing. Iterating through the list and adding them to an ArrayList. The behavior of LazyList seems very dangerous however. Maybe it doesn't fully comply with the specifications of the List interface?
Hi there,
I'm getting very inconsistent and buggy behavior when calling Collections.sort() and Collections.reverse() on the LazyLists returned by query.getResultList(). Basically, the lists are sometimes properly sorted and reversed and sometimes they are half sorted, not sorted in the right order, etc.
I couldn't narrow down the issue precisely but I assume it happens if the LazyList isn't fully populated. Couple questions:
Thanks!
The text was updated successfully, but these errors were encountered: