Apache JDO Project - Fetching concept

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > March 2006 > Fetching concept





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Fetching concept
Didier Schlegel

2006-03-30, 11:57 pm

Hello everybody,

I have a concern about the current fetch-depth concept, maybe I'm just
missunderstanding and don't see all the possiblilities.

The way an object graph is fetched can only be defined with the maximum
fetch-depth and the class's fetch-groups (and the fetch-size). This
means that every instance of a certain class appearing in that fetched
object graph will have exacly the same fields loaded. In certain cases
it is needed that instances of a same class should be loaded differently.
I think with the 'old' fetch-depth concept this was possible as the
depth and fetch-group could be redefined for every field.

<class name="MyClass" detachable="true">
<inheritance strategy="new-table"/>
<field name="longPath" persistence-modifier="persistent"
default-fetch-group="false"/>
</field>
<field name="shortPath" persistence-modifier="persistent"
default-fetch-group="false"/>
</field>
<fetch-group name="myFetchGroup">
<field name="longPath" fetch-depth="5" fetch-group="long"/>
<field name="shortPath" fetch-depth="2" fetch-group="short"/>
</fetch-group>
</class>
<class name="Path" detachable="true">
<...>
<fetch-group name="long">
<...>
</fetch-group>
<fetch-group name="short">
<...>
</fetch-group>
</class>

Is this supported by the new fetching concept? If not, will it be or is
there a workaround?

Thank you!
Didier


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com