Attributes to fetch

From: Craig Miskell (cmiskel..lbatross.co.nz)
Date: Thu Feb 27 2003 - 01:31:47 EST

  • Next message: Andriy Shapochka: "ObjEntity spanning multiple DbEntities proposal"

    I've just been fiddling with prefetching in the case when there is no
    reverse Obj relationship (e.g., fetching Artist, prefetching the
    paintingArray relationship, when Painting doesn't have the toArtist
    relationship defined).

    Code all looked good until I tried to find the foreign key in the target
    object snapshot (ARTIST_ID in Painting). Turns out that
    SelectQueryTranslator doesn't include an attribute unless it's an
    ObjAttribute, or involved in an ObjRelationship join. So, because there's
    no ObjRelationship join involving Artist_id, it isn't fetched.

    The obvious fix is to add all attributes used in DbRel joins, regardless
    of the status of ObjRelationship joins, but that rings alarm bells in
    my head, at least enough to warrant asking this list whether anyone can
    forsee any major (or minor) problems with this? The only one I can think
    of is a slight increase in fetching overhead, although it would be mostly
    network overhead, rather than a significant increase in the time the
    DBMS takes to process the query.

    Anything I'm missing?

    Thanks,
    Craig



    This archive was generated by hypermail 2.0.0 : Thu Feb 27 2003 - 01:30:36 EST