[OJB-developers] How to dynamic lazy-load a field or a collection in runtime?
Brought to you by:
thma
From: John W. <hw...@re...> - 2002-03-11 18:01:42
|
As my application needs a high performance design, I am wondering = whether it is possible to modify the classdescriptor in the runtime, to = disable the loading of unneeded fields, and for collections, don't load = the collection object's primary keys at all (the collection may contain = thousands of items), but load only when needed. Can I do it in the = runtime? Say that for an user, it has following categoties of info: 1. basic info: id, name,=20 2. extended info: home address 3. clob field: photo 4. collection: a long list of friends When retrieve a list of users, it only need to retrieve the basic info; = when view a specific user, it needs the extended info; when you want to = photo, you need to clob fields. You certainly don't want to get the = friends until you want to view a specific user, and also no need to = retrieve primary keys of friends collection, too. Is it possible to do using OJB? Thanks a lot, John W |