Self-Join query

From: Michael K (m_lesta..ahoo.com)
Date: Wed May 25 2005 - 03:34:13 EDT

  • Next message: McDaniel, Joe R.: "RE: Self-Join query"

    Hi,

    I am new to Cayenne. I tried to search for this topic
    using google but couldn't found the answer.
    I have the following table:

    cd_menu:
    - id (BIGINT) Primary Key
    - Parent_id (BIGINT)
    - name (varchar)

    I want to self join the table to display the menu.name
    and parent.name. In SQL query I can write something
    like this:

    select child.name,parent.name
    from cd_menu as child inner join cd_menu as parent on
    child.parent_id=parent.id

    Can I use Cayenne's SelectQuery to do the job?

    Thank you,
    Michael

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com



    This archive was generated by hypermail 2.0.0 : Wed May 25 2005 - 03:34:18 EDT