Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Stream traversal of lazy loaded collections not working
icon13.gif  Stream traversal of lazy loaded collections not working [message #1723245] Fri, 12 February 2016 17:01 Go to next message
José González Gó ez is currently offline José González Gó ezFriend
Messages: 4
Registered: July 2009
Junior Member
It seems you can't use the functional style APIs in lazy loaded collections due to a bug in IndirectList / Vector. Please see this stackoverflow thread for details:

stackoverflow.com/questions/35362581/stream-api-not-working-for-lazy-loaded-collections-in-eclipselink-glassfish

I can't create links, so add http:// before
Re: Stream traversal of lazy loaded collections not working [message #1723247 is a reply to message #1723245] Fri, 12 February 2016 17:18 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 34
Registered: November 2013
Location: Prague, Czech Republic
Member
depends on EclipseLink version being used. Should work fine in 2.6.0 and/or newer
Re: Stream traversal of lazy loaded collections not working [message #1723251 is a reply to message #1723247] Fri, 12 February 2016 18:01 Go to previous messageGo to next message
José González Gó ez is currently offline José González Gó ezFriend
Messages: 4
Registered: July 2009
Junior Member
I'm using the default version included in Glassfish, which version of Glassfish should I use to use EclipseLink 2.6.0 or newer?
Re: Stream traversal of lazy loaded collections not working [message #1723261 is a reply to message #1723251] Fri, 12 February 2016 19:43 Go to previous messageGo to next message
José González Gó ez is currently offline José González Gó ezFriend
Messages: 4
Registered: July 2009
Junior Member
Have just checked, this behavior is present in EclipseLink 2.6.2, this is the version where I have detected it
Re: Stream traversal of lazy loaded collections not working [message #1723329 is a reply to message #1723261] Sun, 14 February 2016 12:51 Go to previous message
Lukas JungmannFriend
Messages: 34
Registered: November 2013
Location: Prague, Czech Republic
Member
Worth filing a bug with attached test case for this. Meanwhile you can call 'getDelegateObject()' on the returned collection before calling 'stream()' , see https://www.eclipse.org/eclipselink/api/2.6/org/eclipse/persistence/indirection/IndirectCollection.html#getDelegateObject()
Previous Topic:Eclipselink v1 API and eclipselink JPA co-existence?
Next Topic:Problem reading binary data to byte array
Goto Forum:
  


Current Time: Fri Apr 23 09:34:53 GMT 2021

Powered by FUDForum. Page generated in 0.02108 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top