Re: Ordering by Primary/Foreign Keys

From: Mike Kienenberger (mkienen..mail.com)
Date: Fri Mar 23 2007 - 16:40:44 EDT

  • Next message: Tobias.Schoessle..nvienna.org: "Re: Required Relations?"

    For primary key, you can use

    "db:" + YourEntity.<YourEntityPkColumn>_PK_COLUMN

    For a foreign key, you could do the same, but it'd be cleaner to use
    the objRelationship name.

    On 3/23/07, Michael Lepine <mikelepin..mail.com> wrote:
    > In my application, I have a few queries that I've created with the
    > SelectQuery class. In some instances, I'd like to order the results by the
    > primary or foreign keys in the table using the addOrdering() method. I have
    > not found a way to do this. I believe I get an error that the column does
    > not exist in the ObjEntity instance referenced by the SelectQuery object.
    >
    > Maybe I'm approaching this the wrong way. Is there a way to add an "order
    > by" clause to a query that includes a primary or foreign key?
    >
    > Thanks for your time and any help.
    >
    > - Mike
    >



    This archive was generated by hypermail 2.0.0 : Fri Mar 23 2007 - 16:41:25 EDT