RE: Self-Join query

From: McDaniel, Joe R. (mcdanij..igr.org)
Date: Wed May 25 2005 - 09:41:21 EDT

  • Next message: Julien Vignali: "JNDI problem..."

    You can certainly do this with as SQLTemplate query as in:

            SQLTemplate sqlTemplateQuery = new SQLTemplate(CdMenu.class,
              "select child.name,parent.name from cd_menu as child inner
    join cd_menu as parent on child.parent_id=parent.id"),
              true);

    You get back a Map instead of CdMenu objects.

    Joe



    This archive was generated by hypermail 2.0.0 : Wed May 25 2005 - 09:41:25 EDT