Re: Query using foreign objects

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Feb 07 2006 - 11:25:01 EST

  • Next message: Andrus Adamchik: "Re: Query using foreign objects"

    On Feb 7, 2006, at 11:20 AM, Dave Merrin wrote:

    > This is not for retrieving the primary key. It is for using the
    > primary key
    > in an expression.

    You can create a getter - it should work in expressions:

    public Object getId() {
        if(getpersistenceState == PersistenceState.NEW) {
            return null;
        }
        else {
            return pkForObject(this);
        }
    }

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Feb 07 2006 - 11:43:23 EST