Re: Attributes to fetch

From: Craig Miskell (cmiskel..lbatross.co.nz)
Date: Fri Feb 28 2003 - 02:32:22 EST

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

    You're doing fine :-) (I once heard someone say that they talk to
    themselves because that's the only way they're guaranteed an intelligent
    conversation :-))

    Not trying to be a pain, but custom db attributes are an either/or
    situation (either you have custom db attributes and nothing else, or the
    "standard" method of creating the list of attributes and no custom
    attributes), at least according to my reading of SelectTranslator. Am I
    missing something, is SelectTranslator incorrect in implementation
    (compared to your expectation at least), or are you thinking of something
    else?

    Sorry to be difficult so near to the end of the week ;-)

    Craig

    On Thu, 27 Feb 2003, Andrus Adamchik wrote:

    > I guess I am too tired for the intellegent conversation :-)
    >
    > Anyway, we can use SelectQuery.addCustDbAttributes(), so that those
    > extra attributes are not fetched for regular queries, only when needed.
    >
    >
    > Andrus
    >
    > Craig Miskell wrote:
    > > Because Artist has paintingArray which we are prefetching. There's no
    > > reverse relationship, and we need some way to try and identify which
    > > Artist that each of the Paintings belongs to (the artist_id of the
    > > painting).
    > >
    > > Craig
    > >
    > > On Fri, 2003-02-28 at 15:53, Andrus Adamchik wrote:
    > >
    > >>Craig Miskell wrote:
    > >>
    > >>>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.
    > >>
    > >>Is this causing problems? Why would you need "artist_id" at all if the
    > >>painting has no "toArtist" relationship?
    > >>
    > >>I maybe missing something of course...
    > >>
    > >>Andrus
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Feb 28 2003 - 02:31:24 EST