On Tue, Sep 29, 2009 at 11:27 PM, Pinaki Poddar wrote:
>
> > ojem.getFetchPlan().addField(A.class, "B");
>
> Mike is right.
>
>
I have discovered that in addition to Mike being right, Daryl is wrong. It
seems I was confounded by a bug where the parent entity is not being
returned for each child.
ut in the debugger, I see the collection is loaded lazily.
>>
>> I also tried using the property instead :
>>
>> query.setHint("openjpa.FetchPlan.EagerFetchMode","parallel");
>>
>>
>> But this resulted in a IllegalArugmentException.
>>
>> What am I missing?
>>
>> Thanks,chris
>>
>>
>
>
-
Pinaki
--
View this message in context:
http://n2.nabble.com/noob-understanding-dynamic-fetch-modes-tp3737203p3740471.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
On Tue, Sep 29, 2009 at 12:02 PM, Christopher Giblin wrote:
>
> Hi,
> I have a class, "A", with a one-to-many relationship to another class, "B".
> Thus A refers to a collection of B.
> Normally I want to load the collection lazy and therefore set fetch to
> "LAZY" in my orm.xml. In one case, howe
Hi Chris,
I'm not an expert on FetchPlans / FetchGroups, but it sounds like example
5.22 from [1] is what you're trying to do..
[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_fetch_single_field
So your code would look like this :
OpenJPAEntityManager ojem = OpenJP
Hi,
I have a class, "A", with a one-to-many relationship to another class, "B".
Thus A refers to a collection of B.
Normally I want to load the collection lazy and therefore set fetch to
"LAZY" in my orm.xml. In one case, however, I want to load A eagerly.
I thought the following would do the tri