Re: Random selection

From: Jim Menard (jim..o.com)
Date: Sat Dec 20 2003 - 16:18:15 EST

  • Next message: Andrus Adamchik: "[ANN] Cayenne 1.0.5 released"

    On Dec 20, 2003, at 2:18 PM, Andrus Adamchik wrote:

    >
    > On Dec 20, 2003, at 11:07 AM, Mike Kienenberger wrote:
    >
    >> You might also define a reverse to-one relationship from photo to
    >> album,
    >> then do a
    >>
    >> matchExp("photo.album", theAlbum)
    >>
    >> in which case you probably wouldn't need the primary key.
    >
    > IMO this is a preferred solution, there is no reason to use a PK
    > directly. You simply need access to the album object and use in the
    > qualifier. Though the expression would be more like
    >
    > matchExp("album", theAlbum)
    >
    > (or whatever the relationship name is).

    Yes, that makes perfect sense. I wasn't thinking in terms of objects,
    and forgot that you could put an object into a matchExp, not just the
    id number. I was thinking in terms of the database.

    Thanks, Mike and Andrus.

    Jim

    -- 
    Jim Menard, jim..o.com, http://www.io.com/~jimm/
    "I invented the term Object-Oriented, and I can tell you I did not have 
    C++
    in mind." -- Alan Kay
    



    This archive was generated by hypermail 2.0.0 : Sat Dec 20 2003 - 16:18:20 EST