Re: How to prevent Cayenne from fetching BLOB fields ?

From: Pierre Lavignotte (pierre.lavignott..mail.com)
Date: Tue Oct 07 2008 - 12:37:36 EDT

  • Next message: Demetrios Kyriakis: "Any other ROP examples?"

    Thanks Scott.

    I didn't find this in the mail archive...

    Do you mean define an entity WITHOUT the BLOB fields, and another, pointing
    on the same table, WITH ONLY the BLOB fields ?
    I guess it will work but I thought there was a built in mechanism to handle
    the BLOB fields differently than the standard ones...

    Pierre

    On Tue, Oct 7, 2008 at 6:29 PM, Scott Anderson <sanderso..irvana.com>wrote:

    > Someone asked a similar question before - the clever solution was to map
    > the field in the modeler as if it were part of a separate table.
    >
    > -----Original Message-----
    > From: Pierre Lavignotte [mailto:pierre.lavignott..mail.com]
    > Sent: Tuesday, October 07, 2008 12:26 PM
    > To: use..ayenne.apache.org
    > Subject: How to prevent Cayenne from fetching BLOB fields ?
    >
    > Hello,
    >
    > I use Apache Cayenne for a while now with no problem, but I went into a
    > new
    > issue today.
    >
    > I have an Oracle data table containing 2 BLOB fields.
    > When I get the rows from this table, Cayenne also fetches the BLOB data,
    > so
    > the query is veeeeery long, or I get a time out exception.
    >
    > I tryed :
    >
    > SelectQuery query = new SelectQuery(MyClass.class);
    > query.setFetchingDataRows(false);
    > context.performQuery(query);
    >
    > and to define an Object Select Query in the modeler but the result is
    > the
    > same.
    >
    > What I would like is the BLOB data to be fetched only on demand, when I
    > call
    > the myEntity.getMyBlobField() method.
    >
    > Did I miss someting ?
    >
    >
    > Thank you for your help,
    > Pierre
    >

    -- 
    Cordialement,
    Pierre Lavignotte
    Ingénieur Conception & Développement
    http://pierre.lavignotte.googlepages.com
    



    This archive was generated by hypermail 2.0.0 : Tue Oct 07 2008 - 12:38:08 EDT