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 : Thu Feb 27 2003 - 22:15:04 EST