Does JPA ( Eclipselink in this case) always return IndirectList where Entity have a List?
Is ok that list or It should be converted to another list( maybe linkedlist)?
Does JPA ( Eclipselink in this case) always return IndirectList where Entity have a
Share
Analysis
If we look at EclipseLink’s IndirectList’s API, it says:
If we view IndirectList sources, we will see, that all the work is delegated to it’s original collection, just like API says.
Answers
Yes, it always does return your specified collection wrapped with IndirectList. Since it delegates all its internal work to the wrapped collection, it preserves the way it works.
Yes, it is okay to use IndirectList. You don’t convert, you just define any type of collection you want and don’t worry about IndirectList, since it is managed transparently.