prefetch - a simple problem?

From: tnaki..ofthome.net
Date: Sun Mar 06 2005 - 13:21:11 EST

  • Next message: Kevin Menard: "Postgres Sequence PK Support?"

    I retrieve an object obj using DataObjectUtils.ObjectForPK().
    I retrieve a list using obj.getOtherObjectArray(). This is fine.
    The problem is that an attribute I need isn't available in otherObject
    but rather in thirdObject.
    The problem is that for each otherObject i have to do a
        thirdObject = DataObjectUtils.ObjectForPK(context,
    ThirdObject.class, idMap)
    where idMap contains otherObjectID and a fourthObjectID (it's a n-to-n
    relation).

    I would like to prefetch a part of the relation represented by
    thirdObject, but since I'm using not SelectQueries to get the data, I
    don't have any idea how to the objects I need.
    I could always create a view in the database and that's all fine and
    well, but I'm interested in cayenne's caching possibilities so I'd be
    grateful for any info you throw at me. :)

    Regards,
    Tomislav



    This archive was generated by hypermail 2.0.0 : Sun Mar 06 2005 - 13:19:12 EST