0 Replies Latest reply on Feb 2, 2006 6:59 AM by krishnamurthi ramasamy

    Get the values from more than one table

    krishnamurthi ramasamy Newbie

      Hi all,

      could u plz any one help me out

      for getting the rows from more than one table by using EJB3.0.
      I'm using hibernate annotations but i'm not able to get.

      I have attached my few codes with this,

      This my bean code.

      public List getTest(String Test)
      {
      String sqlQuery = "from Proj_modules,New_project";
      Query q = manager.createQuery(sqlQuery);
      return q.getResultList();
      }

      This is the way i'm trying to get those values.(Client file .JSP)
      <%

      List modules = obj.getTest("Sample");
      Proj_modules mod = new Proj_modules(); ListIterator iter = modules.listIterator();
      while(iter.hasNext())
      {
      mod = new Proj_modules();
      mod= (Proj_modules) iter.next();
      out.println("First Field Name:"+mod.getName());
      }
      %>



      I u find any other useful sites for doing this just inform me.
      very urgent.......

      I'm using Eclipse,JBoss4.0.1.

      Thank You