Hi,
can JDO fetch all children of a database model at once? Like:
class Parent {
@Persistent(mappedBy="parent")
private Set<Children> children;
}
class Children {
@Persistent
private Parent parent;
@Persistent
private String name;
}
In my case, I have a large number of Parents which I fetch at once. Accessing their children then takes a lot of time because they are fetched lazily. Does JDO (Datanucleus) support their fetching at once, togehter with the Parents?
I also tried to fetch all Children independantly with another quey and put them into the Level2 cache afterwards, but still they are fetched (maybe jdo doesn't know about their relationship? Because the ForeignKey (parent-id) hasn't been fetched at first?)
Any ideas how to read the data structure faster?
Cheers,
Jan