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 reto <re...@yahoo.com> on 2004/03/30 09:59:47 UTC

select a subset of object attributes

Hi togheter,

I want to retrieve only a subset of the attributes of an object (not retrieving
the blobs in the object). I use the PersistenceBroker API. Can anybody give me a
hint if that's possible without going back and using sql direct?
thanks reto


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


Re: select a subset of object attributes

Posted by Armin Waibel <ar...@apache.org>.
Hi,

reto wrote:

> Hi togheter,
> 
> I want to retrieve only a subset of the attributes of an object (not retrieving
> the blobs in the object). I use the PersistenceBroker API. Can anybody give me a
> hint if that's possible without going back and using sql direct?
> thanks reto
> 

- you can use Report Queries to retrieve a subset based on object value 
arrays.
http://db.apache.org/ojb/query.html#report%20queries
(Maven has corrupt this section, please use your local docs, call "ant 
htmldoc" to generate)
- Or you can declare two classes/class-descriptors with and without the 
Blob field.
- Or you "roll out" the blob fields in  a new class and use a 1:1 reference.
- Or you can use metadata profiles on a per thread basis. This allows 
you to change metadata at runtime (see javadoc of MetadataManager, 
recommended only for expert user, because you have to take care of cache)

regards,
Armin

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

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