You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Joerg Lensing <in...@softcon-lensing.de> on 2003/09/08 16:00:13 UTC

partial loading / proxies

Hi Thomas,
in your mail to Alessandro Di Bella (7.3.2003) you write:

> Alessandro Di Bella wrote:
>
>> Hi,
>> I just started using OJB and i'm having a problem with proxy classes. 
>> I want to be able to specify which are the fields to be loaded when 
>> the proxy object is instantiated and which one are loaded on demand. 
>
Thomas wrote:

> The solution you are looking for is not a proxy solution, but is 
> called "fetch groups" or "partial loading". OJB does not provide 
> declarative support for this.
> But you could implement this mechanism on top of the existing OJB 
> features.
> This is possible, but not something that you should do within the 
> first 4 weeks of using OJB...
> The solution
> - could include runtime manipulation of mapping data.
> - you could juggle with different repositories that contain different 
> mappings for the same class, one having only 2 field-decsriptors and 
> the other containing all 17 field-descriptors.
> - or it could be based on your own *user-defined proxy* objects
> - it could be also to have a *preview class* and a *full data class* 
> mapped onto the same table.

My question:  which of these four solutions would you prefer and why?
the preview-solution seems to be the easiest. I tried it, but i had 
problems with it (some problems with extend).
The hierarchy is:

basePO (abstract)
    |-partnerPO (abstract)
             |-personPO
             |-organisationPO

-The preview-class should be able to read fields from all three classes
-all classes may have collections of  additional classes (e.g. address)

any hints?

vm tx
joerg








---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org