Re: missing support for db _PROPERTY columns ?

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Apr 23 2004 - 10:46:52 EDT

  • Next message: Matt Kerr: "Re: missing support for db _PROPERTY columns ?"

    Matt Kerr <mat..entralparksoftware.com> wrote:
    > i have a situation (for better or worse)
    > where i'm querying the database against an fk value.
    > it's only a problem because i have a relationship built on top of that
    > fk column.
    >
    > it seems like although cayenne is aware of the fk columns,
    > it's not completely supporting them - ?
    >
    > i would like to reference the fk by _PROPERTY name when building the
    > qualifier/expression -
    > and i end up adding this to my impl :-( ...

    Querying by a foreign key value is like querying by a primary key value. It
    can be done, but it's not encouraged. Instead, you should just be
    following the relationship.

    If you have a Contact record with an Address fk, you should be using
    aContact.getAddress() to look up the address record.

    If you're just looking up arbitrary Address records, it's not a foreign key
    issue, it's a primary key issue for the Address table.



    This archive was generated by hypermail 2.0.0 : Fri Apr 23 2004 - 10:45:09 EDT