Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Can I get set<MyEntity> instead of Indirect Set in one to many relationship(Issue with retrieving children in one to many relation. Getting Indirect Set instead of set<myEntity>)
Can I get set<MyEntity> instead of Indirect Set in one to many relationship [message #997588] Tue, 08 January 2013 08:47 Go to next message
vamsi raghava is currently offline vamsi raghava
Messages: 2
Registered: December 2012
Junior Member
Hi,

I have self reference one-to-many relationship(children) in a Entity Domain. The getter method (getChildren()) returns Set<Domain>.

The children are loaded lazily.
When I call getChildren() what I am getting is actually IndirectSet.
The actual children can be accessed using "delegate".

I have a scenarion where I need to be able to access the children recursively using getChildren() not getDeligate()

Is that possible?

We are using eclipselink version 2.4.0
Re: Can I get set<MyEntity> instead of Indirect Set in one to many relationship [message #997692 is a reply to message #997588] Tue, 08 January 2013 10:03 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1834
Registered: July 2009
Senior Member
IndirectSet is a Set, so I don't see your issue? What kind of Set do you want, the point of the Set interface is that the implementation does not matter.

If you make the relationship EAGER it will use HashSet by default instead.


James : Wiki : Book : Blog
Previous Topic:Accessing foreign key on @ManyToOne - how to avoid DB roundtrip?
Next Topic:java.lang.ArrayIndexOutOfBoundsException: -1
Goto Forum:
  


Current Time: Tue May 21 10:18:05 EDT 2013

Powered by FUDForum. Page generated in 0.01462 seconds