Re: PK in Expression ok?

From: tnaki..ofthome.net
Date: Thu Mar 24 2005 - 08:39:55 EST

  • Next message: Cris Daniluk: "RE: PK in Expression ok?"

    Fredrik Liden wrote:

    >Is it possible to make a query that includes two criteria, one of them
    >being the primary key of the parent table. Can I include the PK field
    >like a regular field in one of the Expressions?
    >
    >
     From what I understand, it might be a good idea to define a method to
    retrieve the PK in the lower level generated class (which is normally
    empty).
    It's explained on the
    http://www.objectstyle.org/cayenne/userguide/dataobjects/unmapped-keys.html
    page.
    When you have access to your PK, you can use it in expressions like any
    other attribute.
    I'm curious, though: why in the world would you need to include two
    criteria, when one of them uniquely identifies a record?

    Tomislav



    This archive was generated by hypermail 2.0.0 : Thu Mar 24 2005 - 08:37:06 EST